In an effort to supplant Soviet influence in a corner of Africa, the Carter administration has offered to supply U.S. military assistance to Somalia and is seeking to arrange similar aid from European and Arab countries.

The U.S. initiative is a result of the personal fascination and involvement of President Carter, who has spent many hours in governmental briefings and diplomatic discussiions about the maneuverings in Africa's northeast bulge, known as "the Horn of Africa."

Last December the Soviet Union began supplying large-scale military assistance to Ethiopia, a major U.S. arms and aid recipient in Africa for a generation.

The Soviet move created serious tension with neighboring Somalia, which had been a Soviet aid client for a decade and provides naval and air facilities to Russian military forces.

Somalia is the bitter enemy of Ethiopia, and is supporting a guerrilla war to annex Ethiopia's ethnically Somali province of Ogaden.

In rapid sucession this spring. Ethiopia ousted U.S. military advisers and brought in Russians, and the Somalis began meeting with Saudi Arabian leaders and others linked to the west in a hint that they might be willing to change partners in the opposite direction.

Within a few weeks of taking office. Carter was reading voluminous studies he had ordered on the area, and in early April Time magazine - spending "a day with Jimmy Carter" - quoted him as ordering Secretary of State Cyrus R. Vance and national security affairs adviser Zbigniew Brzezinski "to move in every possible way to get Somalia to be our friend."

Last month Carter told a group of magazine publishers at the White House of "my own inclination . . . to agressively challenge, in a peaceful way, of course, the Soviet Union and others for influence in areas of the world that we feel are crucial to us now or potentially crucial." He named SOmalia as a case in point, and has brought up the country several times since in news conferences and private conversations.

Carter has discussed Somalia. Ethiopia and th international maneuvering around them with Egyptian President Anwar Sadat, Saudi Arabian Crown Prince Fahd, and European leaders at the London summit. And Carter held an unannounced meeting at the White House with the Somali ambassador to Washington, Dr. Abdullah Ahmed Addou.

White in general rejecting Kissinger-era superpower rivalry on hte continent, the Africa policy statement delivered July 1 by Vance said the United States "will consider sympathetically appeals for assistance from states which are threatened by a buildup of foreign military equipment and advisers on their borders, in the Horn and elsewhere in Africa." That was a signal to Somalia.

A U.S. economic aid team visited SOmalia this spring and is drawing up an economic program that is to be is corporated in next year's budget. The team was given high-level attention in the Somali capital of Mogadishu and accorded red-carpet treatment, in notable contrast to the severe restrictions usually placed on the activities of the U.S. ambassador and other American officials there.

The United States has told Somalia that "in principle" it is prepared to grant military assistance, according to se veral administration sources. Because Somalia is already among the best-armed states in Africa, is supporting the guerrilla war in Ethiopia and has claimed parts of Kenya, the United States is leery about supplying major weapons and may limit its offers to "defensive" military gear.

France, which has historic colonial inaterests in the area and has just given independence to its port enclave of Djibouti, is reported to have agreed to provide military equipment to Somalia. Britain, which once was the colonial ruler of much of Somalia, has agreed in principle to supply queipment, informed sources said.

An Islamic country with a potentially strategic location on the Indian Ocean and the Gulf of Aden, Somalia is of special interest to Saudi Arabia. The Saudi leadership, which met Somali President Siad Barre most recently July 13, is reported ready to finance SOmali arms purchases from European countries. Some new arms from Arab sources already are being received.

Extensive diplomatic discussion in several capitals inwhich the United States played a major role is reported to have created "a consensus" involving Germany, Italy, Iran and Pakistan, along withthe countries already mentioned, that Somalia shoud be helped to diversify its sources of military supplies and aid or make a full break from the Soviet orbit if it wishes to do so.

Several well-informed U.S. officials said they have no confirmation of reports that large numbers of Soviet advisers are already leaving Somalia. Some 3,000 to 5,000 Russians are believed to be present, some of them in key advisory positions in the army, secret police and governmental ministries.

Because of the extensive Soviet presence. Siad Barre has been cautious in his flirtation with the West.

U.S. military aid to Somalia presents some problems to the Carter administratin, in view of its announced policies of arms restraint and human rights. Somalia is a military-run authoritarian state with a pervasive secret police apparatus patterned on the Soviet KGB.

U.S. support for Somalia may also run into trouble from members of COngress closely alied with Israel. In the crazy-built world of the Horn of Africa, an Israeli counterinsurgency and logistical team is present in Addis Ababa assisting Ethiopia - along with Russians, Cubans and even Libyans - according to U.S. officials.