Valentine’s Day is approaching so this seems like a timely topic. Politico reports young Americans are having less sex, possibly because they are a bit more cautious about it than previous generations and possibly because of their fixation on smartphones.

American adults, on average, are having sex about nine fewer times per year in the 2010s compared to adults in the late 1990s, according to a team of scholars led by the psychologist Jean Twenge. That’s a 14 percent decline in sexual frequency. Likewise, the share of adults who reported having sex “not at all” in the past year rose from 18 percent in the late 1990s to 22 percent from 2014 to 2016, according to our analysis of the General Social Survey…

Similar trends are apparent among younger men and women. In the early 2000s, about 73 percent of adults between the ages of 18 and 30 had sex at least twice a month. That fell to 66 percent in the period from 2014 to 2016, according to our analysis of the GSS.

Other 18- to 30-year-olds aren’t doing it at all. From 2002 to 2004, 12 percent of them reported having no sex in the preceding year. A decade later, during the two years from 2014 to 2016, that number rose to 18 percent.

The bulk of the story is devoted to considering some possible explanations for these trends. One possibility is that the so-called iGen (born since the mid-90s) are a lot more cautious than previous generations. One 20-year-old tells Twenge, the psychologist studying this trend, that there is a lot of concern about pregnancy and disease. Another possibility is that the focus on “rape culture” and now the #MeToo movement have focused attention on negative aspects of sex. For young women, sex has more of an association with risk and coercion. And for young men there is an increased danger of being accused or expelled after a sexual encounter. But perhaps the most interesting possibility is that smartphones and access to pornography are changing behavior:

There is certainly a correlation between the rise of smartphones and the decline of physical sex among young adults. The share of young adults who had a smartphone rose above 50 percent in 2011 and has now reached almost total ownership. The surge in smartphone ownership coincides with the marked, recent declines in sex among young adults and teenagers. The evidence is growing that the spread of highly entertaining and diverting technology discourages in-person socializing, including—we think—one of the most fundamental forms of socializing—sex.

Dating has fallen precipitously in recent years, at least among teens, as smartphones and screens have become more popular. In the past 10 years, the share of high school seniors who reported ever going out on dates fell from about 70 percent to approximately 55 percent. We don’t have data for dating among adults, but “socializing offline” is down among them, too. For all the talk about young adults’ “Netflix and chilling,” many young men and women may end up just bingeing on Netflix, not chilling.

Porn is also likely to be a factor. A decent amount of young men’s screen time and attention is devoted to virtual sex rather than the real thing. “A look at shifting attitudes and behaviors from 1973 to 2012 finds porn viewership has increased substantially among young adults,” noted a research team headed by the economist Joseph Price. For those young adults devoted to porn, Twenge speculates, “Why risk rejection, sexually transmitted diseases, relationship arguments or having to meet up with someone when you can watch porn in the privacy of your own bedroom and do things your way?”

There are broader social consequences to these changes in personal behavior. Less interest in sex and dating correlates with declining marriage and birth rates. That can have a significant impact on big safety net programs like Social Security, which are essentially pay-as-you-go systems that rely on the young to fund benefits for the old. And of course, in the long run, it also means a steadily declining population. That’s exactly what has already happened in Japan.

In Japan, less sex and less marriage seem to have translated into smaller and weaker families. The nation has one of the world’s lowest fertility rates—just 1.41 children per woman, and a population that shrunk by more than 1 million since 2010. Japanese companies struggle to find workers, and the government struggles to pay for public pensions as “its working-age population shrinks and its elderly population surges,” in the words of Phillip Longman and his colleaguesJapan has the largest public debt of any nation in the world.

All of this seems relevant as we’re discussing increasing deficits and debt this week. We’re asking those younger generations and those not yet born to deal with our debt, perhaps assuming there will be more of them to shoulder the burden. But if we continue to follow the pattern set by Japan there could be a lot fewer children around to deal with it than we expect. That means the burden on each of them is going to be even greater than it is on us now.