President Reagan, continuing his smooth recovery from cancer surgery six days ago, made the first public appearance of his recuperation when he came to a window of Bethesda Naval Hospital yesterday to wave at photographers assembled below.

Reagan's upbeat appearance came amid new indications that his decision to undergo the exam that found his tumor last Friday was triggered by a call in late June from his brother, J. Neil (Moon) Reagan, who had just been told that he had cancer of the colon.

It is not known exactly when Neil Reagan called the president but, according to Neil Reagan's doctor, his cancer was diagnosed on June 29, about the time that, according to White House spokesman Larry Speakes, the president made his appointment for a full colon exam at Bethesda Naval Hospital. Although the brothers do not talk to one another frequently, they share a depth of communication that people close to the family say is almost like that of twins. The president is 74 years old, two years younger than his brother. Neil Reagan's surgery, performed July 3 at the Scripps Memorial Clinic in La Jolla, Calif., was uncannily like the operation the president would undergo 10 days later.

The significance of Neil Reagan's call would not have been lost on the president because, since March, he had been advised by doctors to undergo the same kind of exam that revealed Neil Reagan's cancer -- a colonoscopy that uses a flexible tube with an optical viewing device through which doctors see the inside of the lower intestine, or colon.

The president's doctors had advised him in March to have a colonoscopy but, according to the White House, they did not stress any urgency. "The advice given to us," said Speakes, was "that the president should work it in his schedule when he could."

Speakes said the decision to schedule the president's examination at the naval hospital on July 13 was made about two weeks earlier and announced July 8.

"I know that Neil was in contact with his brother," said Dr. Daniel Ritt, who diagnosed Neil Reagan's cancer. "He told me he had spoken to his brother and told him about this."

Ritt said it was highly unusual for two brothers to have exactly the same kind of cancer at the same stage of development in the same part of the colon at the same time. "It's a shocker," Ritt said, "but there is a familial tendency in cancer and you can't rule out the possibility that if one brother has it, the other is at greater risk."

Attempts to reach Neil Reagan by telephone were unsuccessful.

Controversy over the scheduling of Reagan's exam has been growing as more doctors not connected with the president's case have expressed surprise that a full colon exam was not performed months before last Friday, when the colonoscopy revealed a tumor about six feet inside Reagan's colon. In May 1984, a routine exam of Reagan's lower colon found a benign polyp, which was removed. Some doctors have said that although the polyp was not cancerous, such growths can turn cancerous. If there was one in the lower colon, they reasoned, there might be others at later stages of development deeper inside.

In March of this year, a second exam discovered another polyp and, more ominously, evidence of blood in the stool. "A stool positive for blood," said Ritt, "you've got to explain. It could be nothing but it could be cancer and colonoscopy is the best way to find out."

One of the doctors at the naval hospital who examined the president in March, Dr. Walter W. Karney, told The New York Times that the medical team had "strongly urged" a colonoscopy "as soon as possible." The implication was that there had been negligence in waiting until July to do the exam.

Speakes denied there was any sense of urgency in the doctors' recommendations and released a portion of a letter that he said would support his contention. The letter is from the team's intestinal specialist, Dr. Edward Cattau, to White House physician T. Burton Smith. It was part of a larger report that went to the White House with a summary by Karney that, Speakes said, also did not specify any urgency. But Speakes would not release the entire report.

The three-paragraph excerpt recommends that the president undergo a second series of tests for stool blood to confirm the positive findings of an earlier set. "If any of these stools are positive," the excerpt says, "the president should undergo a total colonoscopic examination." If the repeat series is negative "and therefore there is no indication for a total colonoscopic evaluation, I would recommend repeat sigmoidoscopy to remove the polyps in toto." When he took it, Reagan's repeat series of stool tests was entirely negative.

At a news briefing Speakes said he thought the recommendation to have not a sigmoidoscopy, which examines only the lower third of the colon, but a full colonoscopy, came after the repeat stool tests.

Reagan appeared yesterday at a third-floor window of the hospital and, dressed in pajamas and a robe, smiled and waved to photographers. Asked how he was feeling, the president gave an OK sign. Speakes said the president was off all medications and was preparing last night to have his first solid food -- baked chicken and rice -- since preparing for the colonoscopy eight days ago