MOSCOW (AP) _ Newly elected Russian President Boris N. Yeltsin said on Wednesday he will seek sovereignty for the largest Soviet republic within his first 100 days in office. He also demanded that the Soviet premier resign.

''We must turn this pyramid on its head.'' Yeltsin told a news conference one day after his election.

He said he would try to mend fences with Soviet President Mikhail S. Gorbachev, but he outlined a program far more radical than Gorbachev's.

Under Yeltsin's plan, Russia and the other 14 Soviet republics would remain within a reconstituted Soviet Union, but have far more power than the central government in most matters, excluding defense and national security.

''We must withstand the diktat of the center,'' Yeltsin said. ''If we withstand 100 days, if we are not pulled down ... Russia will be independent in every respect. It will make its own decisions. Russian laws must take priority over the union (national) laws. The Russian constitution must precede the union constitution.''

Russia accounts for 52 percent of the Soviet population and three-quarters of its land.

Yeltsin spoke to reporters in the Grand Kremlin Palace, where the Congress of Peoples' Deputies of the Russian Federation named him president Tuesday by a slim, four-vote majority.

Yeltsin said each Soviet republic should have sovereignty, giving it the right to overrule laws passed by the central government and conclude treaties with other Soviet republics and foreign countries. Russia may eventually seek membership in the United Nations, he said.

Yeltsin said he would open treaty negotiations immediately with the secessionist Baltic republics. And he said that if Lithuania suspends its March 11 declaration of independence, Gorbachev should end the sanctions he imposed on the republic and engage in a dialogue.

''I do think 100 days is sufficient to do that,'' Yeltsin said, sketching out the steps he planned to take early in his term.

He said his first task was negotiating with more moderate and conservative members of the Russian Congress to forge a working coalition, including nominating compromise candidates as his deputies and as heads of congressional committees.

He said he had consulted with 200 members of the Congress since his election, seeking alliances.

Any declaration of Russian sovereignty must be approved by the Russian Congress, of which Yeltsin is chairman, or president.

''Russia needs and I think it will acquire genuine sovereignty . .. and will at last have its own internal and external policies,'' he said.

The Russian Congress is a newly created body that is the highest authority in the Russian republic. As its leader, tall, white-haired Yeltsin will play a major role in shaping his own powers and duties.

He poses a major challenge to Gorbachev.

Yeltsin attacked the reform program presented by Soviet Premier Nikolai I. Ryzhkov, which touched off a round of panic buying by calling for steep increases in food prices.

''Regrettably, the ... (national) leadership and government at this point is losing the trust of the nation,'' he said.

''I do think we should demand its resignation,'' he said, referring to the Council of Ministers headed by Ryzhkov.

''I think the (Russian) Congress will decide we will not accept the proposed form of price increases, as was decided by the Ukraine,'' Yeltsin said.

The Ukrainian parliament on Tuesday voted not to block the price increases in that republic.

The price increases Ryzhkov seeks would be part of a transition to a partial market economy in the next five years. Yeltsin wants faster steps toward a market economy, but opposes sharp price increases, an apparent contradiction.

Yeltsin acknowledged disagreements with Gorbachev, but said he would seek a ''businessike'' relationship with him.

''True, we have our differences,'' he said. ''I renounce all these personal aspects fully and completely. I leave that behind.''

Yet at times, he seemed to be baiting the absent Soviet leader, who arrived in Washington.

Asked whether he thought leaders should hold top posts in both Communist Party and government, Yeltsin looked theatrically behind him at a statue of Vladimir I. Lenin, founder of the Soviet state.

''I am against combining any post in one person. And I am talking not just about the chairmanship of the party at the Russian level, at the regional level, or at the local level,'' he said.

It was an oblique call for Gorbachev - Soviet president and Soviet Communist Party general secretary - to give up one post.

Gorbachev brought Yeltsin to Moscow to head the city's Communist Party, but they fell out in 1987 over Yeltsin's demands for faster reform. Yelsin was ousted as Moscow party chief. His election as Russian president capped a remarkable political comeback.