login
A097155
Numbers that reach the fixed point 89 under iteration of f(x) = reverse(x) - maxdigit(x).
5
89, 890, 998, 2125, 3126, 5207, 6207, 7018, 7019, 8099, 8900, 9098, 9899, 9980, 10151, 10152, 10224, 12205, 12259, 12268, 14085, 14086, 15095, 15096, 17972, 18971, 21250, 22015, 22269, 23077, 24005, 24086, 24087, 25096, 26963, 27962
OFFSET
1,1
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(5)=3126 because 3126 -> 6207 -> 7019 -> 9098 -> 8900 -> 89.
MATHEMATICA
nxt[n_]:=Module[{ridn=Reverse[IntegerDigits[n]]}, FromDigits[ridn]- Max[ ridn]]; Transpose[Select[Table[{i, NestWhile[nxt, i, !MemberQ[{0, 89}, #]&]}, {i, 30000}], #[[2]]==89&]][[1]] (* Harvey P. Dale, Dec 21 2011 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jason Earls, Aug 01 2004
EXTENSIONS
Corrected by Harvey P. Dale, Dec 21 2011
STATUS
approved