Former president Jimmy Carter said today that the influence of Iran's Ayatollah Ruhollah Khomeini, his nemesis during the long hostage ordeal, "is rapidly deteriorating."

Carter, in a 90-minute television interview with a Japanese broadcasting firm which is sponsoring his five-day trip to Japan, described Khomeini as "unpredictable, weak in a time of crisis."

Carter said he was convinced that originally neither Khomeini nor the Iranian government intended to hold the Americans more than a few days.

But when the "terrorists" who seized the Americans gained political importance due to their act, "typically Khomeini weakened. He went with the wind of public opinion," Carter said. "He betrayed his governmental leaders and violated Islamic law in punishing these innocent Americans."

At another point in the interview, Carter charged that Khomeini "betrayed the basic elements of Islam's religion in perpetrating murder, encouraging kidnaping and terrorism."

Carter did not amplify his assessment that Khomeini's influence within Iran is diminishing.

He said the "feeling of frustration and embarrassment" in the United States during the lengthy captivity of the hostages was one of the two factors which caused the greatest problems for him in 1980, "my most difficult political year."

He identified the other factor, also emanating from Iran, as the worldwide inflation touched off by the redoubling of world oil prices in the wake of the Iranian revolution.

In a lecture, also sponsored by the broadcasting firm, to more than 600 Japanese business leaders, Carter warned that "a deadly sense of euphoria" about the adequacy of global supplies of oil could lead to still another worldwide "oil shock" with devastating consequences.

Carter called for close cooperation between the United States and Japan in dealing with energy problems. He recommended Japanese purchases of American coal on long-term contracts and Japanese investments in U.S. coal-handling facilities as means of dealing with both energy and trade problems.

During the course of the TV interview with the Kansai Telecasting Corp., Carter also said:

The B1 bomber program, canceled by him and on its way to restoration by the Reagan administration, "is a total waste of money." In view of its "massive air defense," Carter said, "the best way to threaten the Soviet Union is through the cruise missiles, which can be launched from a distance."

He described the neutron warhead, also shelved by him and reactivated by President Reagan, as "not nearly so formidable as depicted by Soviet propaganda," or as formidable as the SS20 medium-range missiles the Soviets are "deploying as rapidly as they can."

Despite criticism, his human rights policy abroad "wasn't ineffective." Carter added, "I wanted every leader of the world when he went to bed to think, how did I perform today in honoring the rights of my citizens, as well as my reputation among freedom loving people in the world?"