login
A097154
Number of iterations of f(x) = reverse(x) - maxdigit(x) needed to reach zero, or -1 if zero is never reached, where maxdig(n) is the largest digit of n.
5
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 4, 4, 5, 3, 3, 3, 3, 1, 2, 2, 4, 4, 6, 5, 3, 3, 3, 1, 2, 2, 2, 4, 4, 7, 3, 3, 3, 1, 2, 2, 2, 2, 4, 4, 5, 3, 3, 1, 2, 2, 2, 2, 2, 4, 6, 3, 3, 1, 2, 2, 2, 2, 2, 2, 4, 5, 3, 1, 2, 2, 2, 2, 2, 2, 2, 4, 3, 1, 2, 2, 2, 2, 2, 2, 2, 2, -1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 6, 6, 9, 7, 8, 8, 10, 7, 2, 3, 10, 7, 8, 9, 3, 3, 3, 3, 4, 4, 4, 4, 4, 8, 4, 4
OFFSET
1,11
COMMENTS
a(89)=-1 because 89 is the first number that will not reach zero: 98-9=89. It is conjectured that 0 and 89 are the only fixed points of f. See A097155 for numbers that reach 89.
EXAMPLE
a(12)=4 because 12 -> 19 -> 82 -> 20 -> 0.
CROSSREFS
KEYWORD
base,easy,sign
AUTHOR
Jason Earls, Aug 01 2004
STATUS
approved