Soviet President Leonid Brezhnev appeared in public today for the first time in four weeks during which there were persistent and widespread rumors that he had been incapacitated by his recent illness.

The 75-year-old Soviet leader appeared frail and distinctly thinner as he listened impassively to an hour-long speech by Politburo colleague Yuri Andropov.

Yet the very fact that he walked unaided in a ceremony broadcast live by Soviet television seemed to restore a sense of normal life here that first was shaken by the death in late January of Mikhail Suslov, the number two man in the Kremlin hierarchy, and later was aggravated by reports of a power struggle and rumors of Brezhnev's demise.

About 5,000 of the Communist Party faithful greeted Brezhnev with an emotional and thunderous ovation when he walked into the main hall of the Kremlin's Palace of Congresses for ceremonies marking the 112th anniversary of the birth of Lenin, founder of the Soviet state.

Brezhnev's appearance seemed designed to show that he remains in charge. The choice of the principal speaker, according to Soviet sources, also symbolized the end of power struggle for the number two position in the Soviet Communist Party.

Andropov, 67, chief of the KGB security police for the past 15 years, was reported by the sources to have been chosen by his colleagues to take over Suslov's post as the party's chief ideologist.

Andropov was reported to have already moved into his new job, sources said, and is to be formally approved by the next Central Committee meeting, set for late May.

The sources said Gaidar Aliev, who spent a career in the KGB before becoming party chief of Soviet Azerbaijan, was the likely choice to replace Andropov as KGB chief.

Andropov's main rival for Suslov's job had been Konstantin Chernenko, 70, a close Brezhnev associate for more than 30 years and head of Brezhnev's office staff.

By relinquishing his KGB position and moving into the powerful Secretariat of the Central Committee, Andropov appears to have taken a major step toward a key leadership position in the eventual succession. It has been the assumption here that the nation's top policeman cannot aspire to the Kremlin's highest post.

While the Kremlin audience as well as many television viewers were visibly relieved to see their leader on the platform, it was apparent that he is not yet in full health. According to some reports, he may have suffered a mild stroke March 25.

Soviet officials close to the leadership said Brezhnev's speech has been affected and it is unlikely he will speak in public soon.

During the ceremony, Brezhnev's face seemed immobile. Except for a few occasions when his colleagues briefly exchanged words with him, he sat motionless throughout Andropov's speech. Out of camera range outside the main hall, sources said, he was seen being helped by aides as he mounted a few steps..

According to Soviet analysts, Brezhnev's authority remains unchallenged although he may have to scale down his activities.

In this view, all factions within the Politburo and the Secretariat have a vested interest in seeing Brezhnev remain in office.

The reported emergence of Andropov as a senior party figure suggests that Brezhnev's policies are likely to continue. In his first major policy speech today, Andropov largely repeated standard Soviet positions on domestic and foreign issues.

Although Andropov's long association with the KGB is something of a stigma, he has been rumored to be a well-educated politician with liberal views. He has never visited a Western country and is largely unknown to Westerners here.

Prior to his KGB post, Andropov held various regional party positions, worked in the Ministry of Foreign Affairs and served as Soviet ambassador to Hungary during the 1956 Hungarian Revolution.

After his 1954-57 tour as ambassador, Andropov worked in the Central Committee bureaucracy as chief of a department dealing with ruling Communist parties until he became chairman of the KGB in 1967. He was elected to the Central Committee in 1961 and became one of its 11 secretaries in 1962. He became a Politburo member in 1973.