This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A039004 Numbers n such that representation in base 4 has same number of 1's and 2's. 13
 0, 3, 6, 9, 12, 15, 18, 24, 27, 30, 33, 36, 39, 45, 48, 51, 54, 57, 60, 63, 66, 72, 75, 78, 90, 96, 99, 102, 105, 108, 111, 114, 120, 123, 126, 129, 132, 135, 141, 144, 147, 150, 153, 156, 159, 165, 177, 180, 183, 189, 192, 195, 198, 201, 204, 207, 210, 216, 219 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Numbers such that sum (-1)^k*b(k) = 0 where b(k)=k-th binary digit of n. - Benoit Cloitre, Nov 18 2003 Conjecture: a(C(2n,n)-1) = 4^n - 1. (A000984 is C(2n,n). - Gerald McGarvey, Nov 18 2007 From Russell Jay Hendel, Jun 23 2015: (Start) We prove the McGarvey conjecture (A) a(e(n,n)-1) = 4^n-1, with e(n,m) = a034870(n,m) = binomial(2n,m), the even rows of Pascal's triangle. By the comment from Hendel in A034870, we have the function s(n,k) = #{n-digit, base-4 numbers with n-k more 1-digits than 2-digits}. As shown in A034870, (B) #s(n,k)= e(n,k) with # indicating cardinality, that is, e(n,k) = binomial(2n,k) gives the number of n-digit, base-4 numbers with n-k more 1-digits than 2-digits. We now show that (B) implies (A). By definition, s(n,n) contains the e(n,n) = binomial(2n,n) numbers with an equal number of 1-digits and 2-digits. The biggest n-digit, base-4 number is 333...3 (n copies of 3). Since 333...33 has zero 1-digits and zero 2-digits it follows that 333...333 is a member of s(n,n) and hence it is the biggest member of s(n,n). But 333...333 (n copies of 3) in base 4 has value 4^n-1. Since A039004 starts with index 0 (that is, 0 is the 0th member of A039004), it immediately follows that 4^n-1 is the (e(n,n)-1)st member of A039004, proving the McGarvey conjecture. (End) LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 FORMULA Conjecture: there is a constant c around 5 such that a(n) is asymptotic to c*n. - Benoit Cloitre, Nov 24 2002 That conjecture is false. The number of members of the sequence from 0 to 4^d-1 is binomial(2d,d) which by Stirling's formula is asymptotic to 4^d/sqrt(Pi*d). If Cloitre's conjecture were true we would have 4^d-1 asymptotic to c*4^d/sqrt(Pi*d), a contradiction. - Robert Israel, Jun 24 2015 MAPLE N:= 1000: # to get all terms up to N, which should be divisible by 4 B:= Array(0..N-1): d:= ceil(log(N)); S:= Array(0..N-1, [seq(op([0, 1, -1, 0]), i=1..N/4)]): for i from 1 to d do   B:= B + S;   S:= Array(0..N-1, i-> S[floor(i/4)]); od: select(t -> B[t]=0, [\$0..N-1]); # Robert Israel, Jun 24 2015 PROG (PARI) for(n=0, 219, if(sum(i=1, length(binary(n)), (-1)^i*component(binary(n), i))==0, print1(n, ", "))) See link in A139351 for Fortran program. CROSSREFS Cf. A139370, A139371, A139372, A139373. Cf. A139351, A139352, A139353, A139354, A139355. Sequence in context: A194226 A193803 A284601 * A070021 A083354 A156242 Adjacent sequences:  A039001 A039002 A039003 * A039005 A039006 A039007 KEYWORD nonn,base,easy AUTHOR 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.

Last modified November 22 18:55 EST 2019. Contains 329410 sequences. (Running on oeis4.)