A278920 In the binary race of Pi, where the race leader changes.
1, 7, 17, 33, 6359, 6363, 6371, 6385, 6443, 6445, 6451, 6465, 6525, 6527, 6563, 6565, 6569, 6571, 6573, 6693, 6917, 6923, 6925, 6965, 6967, 7003, 7011, 7337, 7365, 7367, 7369, 7383, 7403, 7705, 7711, 7763, 7769, 7773, 7775, 7789, 7799, 7801, 7809, 7811, 7821, 7823, 7827, 7829, 7855, 7895, 7899
Offset: 1
Keywords
Examples
Obviously a(1) = 1 is a term since in the binary expansion of Pi the first binary digit must be a one and therefore the "ones" take the lead. a(2) = 7 since this is the first time the "zeros" take the lead. a(3) = 17 since in the first 17 binary digits of Pi, the "ones" regain the count or lead.
Links
- Hans Havermann and Robert G. Wilson v, Table of n, a(n) for n = 1..823
- Hans Havermann, Table of n, a(n) for n = 1..73600
Programs
-
Mathematica
pib = RealDigits[Pi, 2, 10000][[1]]; flag = 1; z = o = 0; k = 1; lst = {}; While[k < 10001, If[pib[[k]] == 0, z++, o++]; If[(z > o && flag != 1) || (z < o && flag != -1), AppendTo[lst, k]; flag = -flag]; k++]; lst
Comments