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

 

Logo

The OEIS is looking to hire part-time people to help edit core sequences, upload scanned documents, process citations, fix broken links, etc. - Neil Sloane, njasloane@gmail.com

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A016016 Number of iterations of Reverse and Add which lead to a palindrome, or -1 if no palindrome is ever reached. 9
1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 1, 1, 1, 2, 1, 2, 2, 3, 4, 1, 1, 1, 2, 1, 2, 2, 3, 4, 6, 1, 1, 2, 1, 2, 2, 3, 4, 6, 24, 1, 2, 1, 2, 2, 3, 4, 6, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

Palindromes themselves are also 'Reverse and Add!'ed !

It is conjectured that a(196) = -1 - see A006860, A023108.

LINKS

T. D. Noe, Table of n, a(n) for n=1..195

Index entries for sequences related to Reverse and Add!

J. Walker, Three Years Of Computing: Final Report On The Palindrome Quest

EXAMPLE

6 -> 6 + 6 = 12 -> 12 + 21 = 33 is palindromic, took 2 steps so a(6)=2.

MATHEMATICA

tol = 1000; r[n_] := FromDigits[Reverse[IntegerDigits[n]]]; 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, k = -1]; k, {n, 98}] (* Jayanta Basu, Jul 11 2013 *)

CROSSREFS

Cf. A033665, A023109, A006960.

Sequence in context: A037806 A038082 A107740 * A063059 A214564 A102675

Adjacent sequences:  A016013 A016014 A016015 * A016017 A016018 A016019

KEYWORD

nonn,base,nice

AUTHOR

Robert G. Wilson v

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 25 19:28 EDT 2017. Contains 287059 sequences.