OFFSET
0,2
COMMENTS
Is a(n) = -1 possible? All numbers below 100 (decimal 144) reach a palindrome.
a(237) is conjectured to be -1.
A060382 lists the smallest possible Lychrel number in base n.
EXAMPLE
a(29) = 91 since (in duodecimal) 25 (decimal 29) + 52 = 77 (decimal 91) and 77 is a palindrome.
a(69) = 507 since (in duodecimal) 59 (decimal 69) + 95 = 132, 132 + 231 = 363 (decimal 507) and 363 is a palindrome.
a(105) = 1885 since (in duodecimal) 89 (decimal 105) + 98 = 165, 165 + 561 = 706, 706 + 607 = 1111 (decimal 1885) and 1111 is a palindrome.
MATHEMATICA
tol = 1728; r[n_] := FromDigits[Reverse[IntegerDigits[n, 12]], 12]; palQ[n_] := n == r[n]; ar[n_] := n + r[n]; Table[k = 0; If[palQ[n], n = ar[n]; k = 1]; While[! palQ[n] && k < tol, n = ar[n]; k++]; If[k == tol, n = -1]; n, {n, 0, 144}]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Eric Chen, Apr 07 2015
STATUS
approved