President Anwar Sadat is leaving the country Sunday for the first time since the January riots, a sign that conditions in Egypt are nearly back to normal after the most serious challenge to his authority since the early months of his presidency.

He is going to Khartoum, Sudan, for a meeting with President Jaafar Nimeri of Sudan and Hafez Assad of Syria.Nimeri, a close ally of Egypt, is expected to join the "unified political command" recently established by Sadat and Assad.

This completes Sadat's reemergence from his isolation after the food price riots that racked the country, leaving at least 79 people dead.

It also reestablishes a pattern that is worrisome to Sadat's supporters who believe that trouble will recur unless the country comes to grips with its overwhelming economic problems.

Sadat, who enjoys international politics and likes to leave domestic affairs to his Cabinet, has committed himself to a program dominated by international matters for the next several months while the country's massive internal difficulties remain every bit as volatile as they were before the riots.

As with the visits of U.S. Secretary of State Cyrus R. Vance and French Foreign Minister Louis de Guiringaud, these international comings and goings command the attention of the pro-government Egyptian media. This is a familiar pattern often used by the government to emphasize Egypt's international prestige and to create the impression that progress is being made toward a comprehensive peace settlement that, by implication will be followed by prosperity.

Political analysts say it is not so much that Sadat is trying to deceive the people, whom he has bluntly warned that more lean years lie ahead. Rather it is that he has little else to offer them besides the hope of good news on the international front.

Diplomats friendly to the government say Sadat is convinced that his country cannot achieve prosperity unless it has peace with Israel and that this conviction underlies his current leadership of the Arab drive for a settlement. But they also question whether these moves on the international scene can effectively deter another outburst of domestic discontent. Opponents of the government say they cannot.

"There are new activist elements of all kinds stirring beneath the surface," a prominent leftist journalist said the other day. "There's everything from puritanical Moslem fanatics to Maoist trade unions. Unless the government recognizes this and responds to them, the country will blow up."

After the Khartoum meeting, Sadat is committed to Arab and Afro-Arab summits in Cairo, visits to the United States and France and a return trip here by Vance in June.All will surely get glowing reports on the radio and in the docile press, but there is doubt that this will pacify the student agitators, unhappy workers and impoverished laborers.

"He has to have something to show for it, there have to be some results," an Egyptian diplomat said. "Otherwise the potential is here to bring down this government."

The January riots clearly shocked Sadat. He responded by firing his ministers of interior, information and social affairs, imposing strict new laws against strikes and demonstrations and blaming Communist elements here and abroad for fomenting the trouble.

It was, as an opposition commentator pointed out, "a police response, not a political response." This was a swipe at Prime Minister Mamdouh Salem, a career police officer, whose political astuteness was questioned after the steep price increases were imposed on basic commodities without any warning to the public. That was what started the riots.

It now appears that the disorders did not come close to toppling the government. The armed forces, the police and the Moslem religious hierarchy remained loyal and the vast majority of Egyptians took no part in the disturbances.

Sadat and his wife, Jehan, criticized for high living by some demonstrators, dropped from public view for about 10 days. This was interpreted by some observers, especially European journalists, as a Nixon-like defensive retreat that might end in his resignation, but Sadat bounced back quickly.

On French television this week, Sadat stressed that he had been able to move about in an open car, to apparent popular acclaim, shortly after the riots. He has resumed public appearances and press interviews.

The Egyptians are concerned about how Sadat's position is perceived abroad and are trying to dispel any notion that he has been so weakened as to diminish his credibility as a peace negotiator who can commit the Arabs to a negotiated settlement at Geneva.

This accounts for the expulsion of a British journalist, David Hirst, the first foreign reporter to be thrown out of here in years, and for an unusual summons to the foreign press corps by the Foreign Relations Committee of Egypt's Parliament.

The committee told the correspondents that "internal problems should not be misunderstood to imply a decline in the solidarity of the Egyptian people or in their support of their political leadership."

This declaration, like the results of a referendum of the new antiriot laws in which more than 99 per cent of the people were said to have backed the government, strained the credulity of critics who regarded them as clumsy attempts to cover up an embarrassing incident.

Neither did anything to alter the basic grim economic facts: The government does not have the money to pay for the food subsidies and public services on which the booming population depends, the burden of foreign debt continues to grow and the high hopes for modernization and insutrialization aroused by Sadat's turn to the West have not been fulfilled.

Meanwhile, the rich few go right on flaunting their money despite unfilfilled promises from the government of new tax laws that will distribute incomes more equitably.