%I #34 Jan 16 2022 12:48:14
%S 4,6,8,16,30,32,6356,6358,6360,6362,6364,6368,6370,6372,6374,6384,
%T 6430,6442,6444,6446,6450,6464,6468,6470,6508,6514,6524,6526,6562,
%U 6564,6568,6570,6572,6586,6588,6688,6690,6692,6694,6806,6866,6916,6918,6920,6922
%N Numbers n such that there are equal numbers of 0's and 1's in first n digits of binary representation of Pi.
%C Number of terms < 10^k: 3, 6, 6, 129, 599, 777, ..., . - _Robert G. Wilson v_, Apr 13 2009
%C Number of terms < 10^k (k = 7, 8, 9, 10): 1646, 1646, 45915, 147043. - _Hans Havermann_, Nov 25 2016
%C A039624 terms are the indices of zeros in A166006. - _Hans Havermann_, Nov 25 2016
%H Robert G. Wilson v, <a href="/A039624/b039624.txt">Table of n, a(n) for n = 1..777</a>
%H Hans Havermann, <a href="http://chesswanks.com/seq/b039624.txt">Table of n, a(n) for n = 1..147043</a>
%t pir = RealDigits[Pi, 2, 10^6][[1]]; fQ[n_] := Count[ Take[ pir, 2n], 1] == n; 2 Select[ Range@ 3461, fQ@# &] (* _Robert G. Wilson v_, Apr 13 2009 *)
%t Position[Accumulate[RealDigits[Pi,2,7000][[1]]/.(0->-1)],0]//Flatten (* _Harvey P. Dale_, Jan 18 2019 *)
%Y Cf. A004601, A166006.
%K base,nonn
%O 1,1
%A _Brian Galebach_
%E More terms from _Alexander D. Healy_, Jun 22 2001
|