login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066145 In base 2, records for the number of 'Reverse and Add' steps needed to reach a palindrome. 5
0, 1, 2, 4, 5, 11, 21, 32, 37, 46, 48, 49, 53, 89, 99, 142, 147, 273, 297, 345, 515, 550, 573 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The analog of A065199 in base 2. A066144 gives the corresponding starting points.
Terms a(19..22) obtained by assuming that a(n+1) <= a(n) + 300. - A.H.M. Smeets, Apr 30 2022
LINKS
EXAMPLE
Starting with 74, 11 'Reverse and Add' steps are needed to reach a palindrome; starting with n < 74, at most 5 steps are needed.
MATHEMATICA
limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
best = -1; lst = {};
For[n = 0, n <= 10000, n++,
np = n; i = 0;
While[np != IntegerReverse[np, 2] && i < limit,
np = np + IntegerReverse[np, 2]; i++];
If[i < limit && i > best, best = i; AppendTo[lst, i]]]; lst (* Robert Price, Oct 14 2019 *)
CROSSREFS
Record values in base b: A077407 (b=3), A075687 (b=4), A306600 (b=8), A065199 (b=10), A348572 (Zeckendorf).
Sequence in context: A049913 A223220 A113058 * A095022 A279050 A317828
KEYWORD
base,more,nonn
AUTHOR
Klaus Brockhaus, Dec 08 2001
EXTENSIONS
Offset corrected and a(19)-a(23) by A.H.M. Smeets, Apr 30 2022
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 11:31 EDT 2024. Contains 375131 sequences. (Running on oeis4.)