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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066123 In base 2, two 'Reverse and Add' steps are needed to reach a palindrome. 1
11, 13, 23, 29, 39, 43, 53, 55, 57, 59, 69, 79, 81, 87, 91, 109, 117, 121, 133, 143, 151, 161, 167, 171, 173, 175, 179, 181, 183, 205, 207, 213, 215, 229, 233, 235, 237, 239, 241, 243, 245, 247, 261, 265, 277, 287, 289, 303, 311, 321, 327, 337, 343, 347, 349 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

The analogue of A065207 in base 2. The number of steps starts at 0, so palindromes (cf. A006995) are excluded.

LINKS

Harry J. Smith, Table of n, a(n) for n=1,...,1000

Index entries for sequences related to Reverse and Add!

PROG

(PARI) Rev(x)= { local(d, r=0); while (x>0, d=x%10; x\=10; r=r*10 + d); return(r) } digitsIn(x)= { local(d); if (x==0, return(1)); d=1 + log(x)\log(10); if (10^d == x, d++, if (10^(d-1) > x, d--)); return(d) } Palin(x)= { local(d, e, f, i, t, y); if (x==0, return(1)); y=x; d=digitsIn(x); t=10^(d - 1); for (i=1, d\2, f=y-10*(y\10); y\=10; e=x\t; x-=t*e; t/=10; if (e!=f, return(0)) ); return(1) } baseE(x, b)= { local(d, e=0, f=1); while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) } baseI(x, b)= { local(d, e=0, f=1); while (x>0, d=x-10*(x\10); x\=10; e+=d*f; f*=b); return(e) } calcB(p)= { local(b, r); b=baseE(p, 2); r=Rev(b); d=baseI(r, 2) + p; b=baseE(d, 2); return(b); } { n=0; for (m=1, 10^9, d=m; t=1; b=baseE(d, 2); for (i=1, 2, if (Palin(b), t=0; break); b=calcB(d)); if (t && Palin(b), write("b066123.txt", n++, " ", m); if (n==1000, return)) ) } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Feb 01 2010]

CROSSREFS

A006995, A065207, A066122.

Sequence in context: A075519 A019406 A080790 * A048393 A136058 A106073

Adjacent sequences:  A066120 A066121 A066122 * A066124 A066125 A066126

KEYWORD

base,nonn

AUTHOR

Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Dec 08 2001

EXTENSIONS

OFFSET changed from 0,1 to 1,1 by Harry J. Smith (hjsmithh(AT)sbcglobal.net), Feb 01 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 09:27 EST 2012. Contains 205904 sequences.