The Department of Health and Human Services released a little-noticed report on Medicare a few months ago that had this startling statistic: In 2011 and 2012, 2.2 million beneficiaries received free sexually transmitted disease screenings and counseling sessions. And more than 66,000 received free H.I.V. tests.

The number of Medicare enrollees who took advantage of free S.T.D. tests is about the same as the number who received free colonoscopies to screen for colon cancer, amounting to about 5 percent of all those on Medicare.

Numbers from the Centers for Disease Control and Prevention show rapid increases in S.T.D.’s among older people. Between 2007 and 2011, chlamydia infections among Americans 65 and over increased by 31 percent, and syphilis by 52 percent. Those numbers are similar to S.T.D. trends in the 20- to 24-year-old age group, where chlamydia increased by 35 percent and syphilis by 64 percent. Experts suggest there are four main factors contributing to the rise in S.T.D.’s among older Americans.

First, retirement communities and assisted living facilities are becoming like college campuses. They cram a lot of similarly aged people together, and when they do, things naturally happen. I mentioned these numbers to a friend, and she was not surprised. When her father moved into an assisted-living facility, she said, three women came by to introduce themselves within 30 minutes. And it wasn’t to compare Medicare pharmacy plans and premiums.

Second, older people are living longer and are in better health. As a result, they are remaining sexually active much later into life. Several major surveys, including the National Social Life, Health and Aging Project and the National Survey of Sexual Health and Behavior, report that among people age 60 and older, more than half of men and 40 percent of women are sexually active.

But while they are having a lot of sex, seniors didn’t seem to get the safe sex memo, or when it came through they ignored it because they did not think it applied to them. They obviously don’t have to worry about pregnancy. And they grew up before the safe sex era. So seniors might think they have no reason to use condoms. According to the 2010 National Survey of Sexual Health and Behavior, among college-age Americans, condoms are used in about 40 percent of sexual encounters, but only in about 6 percent of sexual encounters among those 61 and older. A study published in the Annals of Internal Medicine showed that older men who use Viagra and similar drugs are six times less likely to use condoms compared with men in their 20s.

Combine retirement communities, longer life, unfamiliarity with condoms and Viagra — and what do you get? You get an S.T.D. epidemic among the Social Security generation that rivals what we imagine is happening in those “Animal House” fraternities.

These S.T.D. numbers demand that seniors take responsibility for their actions.

Clinicians must be aware of these trends and not overlook S.T.D. screenings when treating older patients. As you might expect, though, doctors are not very good at talking about sex in general and protected sex in particular — especially to the elderly. If doctors aren’t having “the talk,” we have to get safe sex counselors more involved at retirement communities and assisted living facilities. These facilities could also consider making condoms readily available, as they often are on college campuses.

We also need a big public health campaign on safe sex aimed not just at college students but at older people who are living independently. Maybe the AARP can push its constituents to be sexually responsible. Social Security could include some information on S.T.D.’s and how to use a condom when it sends out checks. Come to think of it, these data mean there is an untapped market: over 40 million Americans who are unfamiliar with latex protection. Maybe Durex and Trojan can mail free condoms to every Social Security recipient?

An oncologist, vice provost at the University of Pennsylvania and contributing opinion writer.