"Logan's Run", 3 takes on it.
"Logan's Run" is a novel by William F. Nolan and George Clayton Johnson.
Published in 1967, it depicts a dystopic ageist future society in which
both population and the consumption of resources are maintained in
equilibrium by requiring the death of everyone reaching the age of 21.
The story follows the actions of Logan, a Sandman charged with enforcing
the rule, as he tracks down and kills citizens who "run" from society's
lethal demand—only to end up "running" himself. ---
When people reach this Lastday they report to a Sleepshop in which they
are willingly executed via a pleasure-inducing toxic gas."
"Logan's Run is a 1976 American science fiction film directed by Michael
Anderson and starring Michael York, Jenny Agutter, Richard Jordan,
Roscoe Lee Browne, Farrah Fawcett, and Peter Ustinov.
It depicts a utopian future society on the surface, revealed as a
dystopia where the population and the consumption of resources are
maintained in equilibrium by killing everyone who reaches the age of 30."
It uses the idea of "Carrousel" [sic] (mix of indoor tornado &
fly zapper to do the renewal!) for eliminating 30-year-olds.
"Themes[edit]
Logan's Run explores utopian and dystopian themes, with the idea that
characters willingly die instead of reaching advanced ages, reflecting
the idea that "Utopias require its participants to give something up in
order to create harmony and uniformity".[22] Common dystopian themes
include an evil ruling authority, the confiscation of children from
parents,[23] life in a city, and the idea of human overpopulation, --
Prominent concepts in the film are "the dangers of hedonism, youth
worship, and, particularly, the dangers of government-sponsored
euthanasia"."
It was also a TV series.
"In the series, Logan begins to question Carousel and the need to die
at 30, and decides to run by himself.
In the film, participants in Carousel were seemingly shot and killed in
a shower of sparks (like a laser blast). When they are killed in the
series, they glow and are vaporized.
In the film, the City is run by a computer. In the series, it is run
by a secret cabal of old men.
https://en.wikipedia.org/wiki/Logan%27s_Run
https://en.wikipedia.org/wiki/Logan%27s_Run_(film)
https://en.wikipedia.org/wiki/Logan%27s_Run_(TV_series)