login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178679 Numbers n such that the binary expansion of n starts with the base 3 expansion of n. 3
0, 1, 9, 10, 12, 94, 118, 120, 2217, 22204, 22602, 26608, 27004, 27009, 531795, 5021473, 5321298, 6384861, 50218140, 63858541, 1181639052, 12029699478, 14392731189, 15114438648, 283004031766, 283592574694, 2672433464707, 2835932927661 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

It is much easier to find the terms by backtracking (see PARI code). It seems that the sequence is infinite and log(a(n))/(n*log(3))->1 as n goes to infinity. - Robert Gerbicz, Jun 04 2010

LINKS

Robert Gerbicz, Table of n, a(n) for n = 1..208

EXAMPLE

2217 = 100010101001 (base 2)

2217 = 10001010.... (base 3)

531795 = 10000001110101010011 (base 2)

531795 = 1000000111010....... (base 3)

50218140 = 10111111100100010010011100 (base 2) = 10111111100100010 (base 3)

63858541 = 11110011100110011101101101 (base 2) = 11110011100110011 (base 3)

MATHEMATICA

Do[i3=IntegerDigits[n, 2]; l3=Length[i3]; i=FromDigits[i3, 3]; i2=IntegerDigits[i, 2]; If[i3==Take[i2, l3], Print[i]]; , {n, 0, 10^7}]; (* Ray Chandler, Jun 03 2010 *)

PROG

(PARI code from Robert Gerbicz)

ct=1; print("1 0"); for(L=1, 200, pos=1; a=vector(L); a[1]=0; \

while(pos>0, backtrack=0; a[pos]++; \

if(a[pos]>1, backtrack=1, \

n1=sum(i=1, pos, a[i]*3^(L-i)); n2=n1+3^(L-pos); n=sum(i=1, L, a[i]*2^(L-i)); \

if(pos==L, L1=length(binary(n1)); \

if(shift(n1, L-L1)==n, ct++; print(ct" "n1)), \

b1=binary(n1); b2=binary(n2); L1=length(b1); L2=length(b2); ext=1; \

if(L1==L2, s=0; while(s+1<=L1&&s+1<=pos&&b1[s+1]==b2[s+1], s++); \

if(sum(i=1, s, abs(b1[i]-a[i]))!=0, ext=0)); if(ext, pos++; a[pos]=-1))); \

if(backtrack, pos--)))

CROSSREFS

Cf. A169828, A178680.

Sequence in context: A279731 A037408 A178680 * A154766 A116594 A249723

Adjacent sequences:  A178676 A178677 A178678 * A178680 A178681 A178682

KEYWORD

nonn

AUTHOR

Zak Seidov and Ray Chandler, Jun 03 2010

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 December 7 13:08 EST 2021. Contains 349581 sequences. (Running on oeis4.)