Robert R.'s former doctors suspected that he had engaged in homosexual intercourse. But none of the experts had any idea where he could have become infected.

''It seems odd to me that it was in St. Louis to begin with,'' said Dr. Harold Jaffe, chief AIDS epidemiologist at the Centers for Disease Control. He noted that St. Louis was not one of the first cities to be hit by the AIDS epidemic, which was first detected in New York and California.

In 1968 Robert R. appeared at a clinic associated with Washington University suffering from an assortment of illnesses. Most striking, said Dr. William Drake, a St. Louis pathologist who is now retired, were swollen lymph nodes in Robert R.'s neck and ''swelling of the legs, lower torso and genitalia for no apparent reason.''

Dr. Drake said Robert R.'s physicians tried unsuccessfuly to treat him by surgically draining his lymph nodes.

Although the St. Louis doctors tried for 15 months to help Robert R., his disease followed an unremittingly downhill course. He was exhausted, he lost weight, and he was plagued with a severe infection with chlamydia, a bacteria that frequently infects gay men and that is sexually transmitted. His physicians treated him with a battery of antibiotics, but the youth died in 1969 after a bout with bronchial pneumonia, Dr. Drake said. AIDS-Linked Cancer Found

An autopsy showed that the Robert R. had Kaposi's sarcoma, a skin cancer that is almost a hallmark of AIDS infections in gay men. The youth had just one outward sign of the cancer, a tiny purple spot on his thigh, Dr. Drake said. But when Dr. Drake performed an autopsy, he found other Kaposi sarcoma lesions throughout the soft tissues of the youth's body.

Dr. Memory Elvin-Lewis, a chlamydia specialist at Washington University, said she was fascinated by Robert R.'s illness and wanted to study his tissues to determine the extent of his chlamydia infection. When the autopsy was done, Dr. Elvin-Lewis requested that tissues from the body be frozen so she could examine them at a later time.