OFFSET
1,3
COMMENTS
Terms a(19..22) obtained by assuming that a(n+1) <= a(n) + 300. - A.H.M. Smeets, Apr 30 2022
EXAMPLE
Starting with 74, 11 'Reverse and Add' steps are needed to reach a palindrome; starting with n < 74, at most 5 steps are needed.
MATHEMATICA
limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
best = -1; lst = {};
For[n = 0, n <= 10000, n++,
np = n; i = 0;
While[np != IntegerReverse[np, 2] && i < limit,
np = np + IntegerReverse[np, 2]; i++];
If[i < limit && i > best, best = i; AppendTo[lst, i]]]; lst (* Robert Price, Oct 14 2019 *)
CROSSREFS
KEYWORD
base,more,nonn
AUTHOR
Klaus Brockhaus, Dec 08 2001
EXTENSIONS
Offset corrected and a(19)-a(23) by A.H.M. Smeets, Apr 30 2022
STATUS
approved