login
A097157
Number of iterations of f(x) = reverse(x) - maxdigit(x) needed for the numbers in A097155 to reach 89.
5
0, 1, 2, 7, 5, 6, 4, 5, 3, 4, 1, 2, 3, 2, 13, 11, 10, 7, 9, 7, 8, 10, 10, 12, 18, 19, 7, 9, 7, 8, 8, 8, 10, 1, 0, 16, 17, 10, 5, 5, 8, 6, 8, 8, 14, 15, 9, 6, 8, 12, 13, 9, 7, 6, 8, 7, 6, 9, 6, 10, 11, 8, 10, 8, 9, 7, 11, 9, 7, 4, 7, 5, 4, 8, 9, 8, 6, 8, 9, 7, 11, 9, 3, 5, 3, 7, 6, 6, 7, 6, 8, 6, 7, 5, 9
OFFSET
1,3
COMMENTS
89 is the first number that will not reach zero under iteration of f(x) = reverse(x) - maxdigit(x) since 98-9=89. It is conjectured that 0 and 89 are the only fixed points of f.
EXAMPLE
a(4)=7 because A097155(4)=2125 and 2125 -> 5207 -> 7018 -> 8099 -> 9899 -> 9980 -> 890 -> 89 takes 7 steps to reach 89.
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jason Earls, Aug 01 2004
STATUS
approved