That’s probably Logan’s Run , by William F Nolan and George Clayton Johnson.
It was turned into both a film and a TV series, and there are several sequels.
Published in 1967, the novel 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.
The sign isn’t a painted hand, but a crystal embedded in the hand.
It changes colour as you get older, and goes black when you’re over 21.
scifi.stackexchange.com/users/23/Mike Scott
This sounds like it could be Logan's Run , which published in 1967 and made into a film in 1976.
Logan is a sandman , a kind of police officer who tracks down and kills runners , who are people who've reached the age of 21 and have tried to run rather report to a Sleepshop .
People are implanted with a crystal that turns red as they become teenagers, and black on their 21st birthday.
This could be the "red hands" you remember.
Logan is tasked to pose as a runner and infiltrate an underground railroad which has been helping runners get away.
He discovers that the railroad is being run by his friend and fellow runner.
scifi.stackexchange.com/users/373/HorusKol
I see several analogies with " A Generation Removed " by Gary K. Wolf although it doesn’t fit your description 100%.
In this short novel, published in 1977, the US are ruled by the young people and, as long as they're young, they are also allowed to do anything they wish: people are young up to the age of twenty.
As soon as they turn twenty they become adults and are tolerated as active population until the age of 55: at that point, old people keep being checked up even by mobile units on the streets and, as soon as they aren’t healthy anymore, they are euthanized on the spot.
Or just burned in fire chambers as a show for the young people’s delight.
The main character is a 51 year-old cop who's been assigned desk duties due to his age: but suddenly his Captain (even by name) puts him to active duty again, to infiltrate the resistance network, made up of old farts who keep fighting the young rulers.
Once accepted by the resistance, he realizes they are the good guys and joins them actively, de facto turning on the police: but Captain already knew he would betray them and lets his deputy hunt him until the final showdown.
There are no red hands involved but people over 55 must wear a black band to the arm.
scifi.stackexchange.com/users/124667/Zab Zonk
It’s more a short novel than a short story, but this is a good match for William F Nolan and George Clayton Johnson’s 1967 Logan’s Run .
It has: A society where people are executed at 21 A group of enforcers (Sandmen) who track and kill those who try to escape death Crystals in peoples hands which turn red when they reach 22 A main character who stages his escape on his final day to find where the escapees go He is chased by a friend (not a protege)
scifi.stackexchange.com/users/4804/James McLeod
It reminds me of Buzzati's "Cacciatori di vecchi" published in 1966.
It really is a short story, not a short novel.
It was translated in French as "Chasseurs de vieux" .
It's hard to find information in English about it, although it is mentioned here .
In the story, there is a youth movement (criminal?
it is not clear)
that hunts down elderly people.
It ends with the leader of the movement being himself old and hunted down.
Even if what you are looking for is Logan's Run , it is pretty interesting that this was published before and seems very similar.
scifi.stackexchange.com/users/126312/bomzh
I am pretty sure this was a short story in a collection of sci-fi stories.   It was written from the perspective of one of the people whose job was hunting down and killing people that grew too old, after he himself reached that age. IIRC, he is hunted by his own protege.  I think that there was some kind of sign they had, a painted red hand. But that might be from somewhere else.   I read the book around 20 years ago, but would assume the story to be older.
Dystopia of a world where old people get killed
scifi.stackexchange.com
<story-identification><short-stories>
scifi.stackexchange.com/questions/227518
scifi.stackexchange.com/users/116201/Lot
This story is probably Logan's Run by William F. Nolan and George Clayton Johnson, which was published in 1967 and depicts a dystopic world that requires the death of everyone over 21. The most likely explanation is that it is Logan's Run (1967) altho the sign of reaching the age for killing here is a crystal rather than a painted hand.Another possibility is " A Generation Removed " (1977) by  Gary K. Wolf  although it also doesn’t fit 100%. 
It is probably Logan's Run (1967), where people over 21 are killed when a crystal embedded into their hands turns black (rather than the sign being a painted hand). There are similarities to " A Generation Removed " (1977) by  Gary K. Wolf  although it doesn’t fit 100%. People over 55 are killed when no longer healthy and there is a 51 year old cop who joins the resistence, but people over 55 must wear a black armband rather than having a hand painted red. It is similar to Buzzati's "Cacciatori di vecchi" published in 1966, which also ends with the movement's leader growing old and being hunted down himself.