OFFSET
1,1
COMMENTS
Let f_n(k) denote the sum of the n-th powers of the decimal digits of k. For any positive integer k, the sequence k, f_n(k), f_n(f_n(k)), ... eventually enters a cycle. a(n) is the number of distinct such cycles.
LINKS
EXAMPLE
For n=1, f1(k) is the digit sum, and iteration of f1 always leads to a single-digit fixed point, giving 9 distinct cycles: {1}, {2}, ..., {9}. So a(1) = 9.
For n=12, starting from 98840282759: f_12(98840282759) = 9^12 + 8^12 + 8^12 + 4^12 + 0^12 + 2^12 + 8^12 + 2^12 + 7^12 + 5^12 + 9^12 = 785119716404. Continuing the iteration gives the cycle (98840282759, 785119716404, 381286065015, 142281334933, 351184701607). There are 5 distinct cycles in total, with representative elements 1, 2700216437, 16068940818, 4876998775, and 98840282759. Every positive integer eventually enters one of these 5 cycles, so a(12) = 5.
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Zhao Hui Du, Apr 04 2026
STATUS
approved
