login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065318 24 'Reverse and Add' steps are needed to reach a palindrome. 10
89, 98, 16991, 17981, 18971, 19961, 26990, 27980, 28970, 29960, 50169, 51159, 52149, 53139, 54129, 55119, 56109, 56199, 57189, 58179, 59169, 60168, 60649, 61158, 61639, 62148, 62629, 63138, 63619, 64128, 64609, 64699, 65118, 65689, 66108, 66198, 66679, 67188, 67669, 68178, 68659, 69168, 69649, 70167, 70648, 71157, 71638, 72147, 72628, 73618, 74127, 74608, 74698, 75117, 75688, 76107, 76197, 76678, 77187, 77668, 78177, 78658, 79167, 79648, 80166, 80339, 80499 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The number of steps starts at 0, so palindromes (cf. A002113) are excluded. 24 is a record (cf. A065199) of the number of 'Reverse and Add' steps needed to reach a palindrome.

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..500

Index entries for sequences related to Reverse and Add!

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

A002113, A065198, A065199.

Sequence in context: A039437 A043260 A044040 * A226241 A033254 A215165

Adjacent sequences:  A065315 A065316 A065317 * A065319 A065320 A065321

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 25 23:52 EDT 2019. Contains 324367 sequences. (Running on oeis4.)