OFFSET
1,1
COMMENTS
LINKS
MATHEMATICA
palQ[n_]:=Module[{idn=IntegerDigits[n]}, idn==Reverse[idn]]; With[{tstx =Join[Table[False, {24}], {True}]}, tstQ[n_]:=palQ/@NestList[#+FromDigits[ Reverse[IntegerDigits[#]]]&, n, 24]==tstx]; Select[Range[100000], tstQ] (* Harvey P. Dale, Nov 26 2010, Sep 30 2011 *)
lenQ[n_]:= Length[NestWhileList[# + FromDigits[Reverse[IntegerDigits[#]]]&, n, #!= FromDigits[Reverse[IntegerDigits[#]]]&, 1, 25]] == 25; Select[Range[100000], lenQ] (* Vincenzo Librandi, Sep 24 2013 *)
PROG
(ARIBAS): function revaddi_steps(k, start, up: integer); var n, m, steps, rev: integer; begin for n := start to up do m := n; rev := int_reverse(m); steps := 0; while steps < k and m <> rev do m := m + rev; rev := int_reverse(m); inc(steps); end; if steps = k and m = rev then write(n, " "); end; end; end; revaddi_steps(24, 0, 66200).
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Klaus Brockhaus, Oct 30 2001
EXTENSIONS
Additional terms from Harvey P. Dale, Nov 26 2010
Changed offset from 0 to 1 by Vincenzo Librandi, Sep 24 2013
STATUS
approved