3 ms·
> (summing up their digits recursively gives 3 6 or 9) My fun fact is that this type of operation (repeatedly applying a child operation until you reach a fixe
by maxbond 11mo ago
> (summing up their digits recursively gives 3 6 or 9)
My fun fact is that this type of operation (repeatedly applying a child operation until you reach a fixed point) is called persistence.
https://en.wikipedia.org/wiki/Persistence_of_a_number https://en.wikipedia.org/wiki/Persistence_of_a_number
The fixed point here being that if you add up a list of 1 digits, you'll always reach the same number (`sum([1]) = 1`). The best known is probably the hailstone sequence.
https://en.wikipedia.org/wiki/Collatz_conjecture https://en.wikipedia.org/wiki/Collatz_conjecture
I'm partial to multiplicative persistence.
https://www.youtube.com/watch?v=Wim9WJeDTHQ https://www.youtube.com/watch?v=Wim9WJeDTHQ [15m]