login
Numbers n such that the first n decimal digits of Pi contain equal numbers of even and odd decimal digits.
3

%I #13 Jan 10 2024 18:39:00

%S 84,576,578,580,582,646,654,682,684,686,688,690,692,694,696,698,700,

%T 702,706,722,736,740,742,2406,2408,2414,2416,2430,2432,2438,2440,2502,

%U 2504,2506,2512,2514,2516,2518,2522,2524,2540,2542,2546,2548,2756,2758,2762

%N Numbers n such that the first n decimal digits of Pi contain equal numbers of even and odd decimal digits.

%C Is this sequence infinite?

%H Harvey P. Dale, <a href="/A175813/b175813.txt">Table of n, a(n) for n = 1..459</a> (* The highest term in this b-file is 905564 and there are no further terms up to and including the 5 millionth digit of Pi. *)

%e 84 is in the sequence because the first 84 digits of Pi = 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986 include 42 odd digits and 42 even digits.

%t L= Rest@FoldList[ Plus, 0, (-1)^First@ RealDigits[Pi, 10, 3000]] ;Do[If [L[[n]]==0,Print[n]],{n,3000}]

%t Position[Accumulate[If[EvenQ[#],1,-1]&/@(RealDigits[Pi,10,3000][[1]])],0]//Flatten (* _Harvey P. Dale_, Jan 10 2024 *)

%Y Cf. A175792.

%K nonn,base

%O 1,1

%A _Michel Lagneau_, Sep 09 2010