A065208 Numbers which need three 'Reverse and Add' steps to reach a palindrome.
59, 68, 86, 95, 155, 156, 157, 158, 164, 165, 168, 178, 180, 184, 185, 186, 194, 199, 249, 254, 255, 256, 257, 263, 264, 267, 277, 283, 284, 285, 293, 298, 299, 348, 349, 354, 355, 356, 362, 366, 376, 382, 384, 389, 392, 397, 398, 399, 439, 447, 448, 449, 452, 453, 455, 461, 462, 465, 475, 481, 482
Offset: 1
Links
Programs
-
ARIBAS
revadd_steps(3,54). For the definition of function revadd_steps see A065206.
-
Mathematica
palQ[n_]:=Module[{idn=IntegerDigits[n]},idn==Reverse[idn]] tst[n_]:=palQ/@NestList[#+FromDigits[Reverse[IntegerDigits[#]]]&,n,3]=={False,False,False,True} Select[Range[750],tst] (* Harvey P. Dale, Nov 26 2010 *)
-
PARI
isok(n,s=3)={for(k=0, s, my(r=fromdigits(Vecrev(digits(n)))); if(r==n, return(k==s)); n += r); 0} \\ Andrew Howroyd, Dec 06 2024
Extensions
Offset changed from 0 to by Harry J. Smith, Oct 14 2009
More terms from Harvey P. Dale, Nov 26 2010
Comments