login
Parity of digits of Pi.
7

%I #27 Jun 22 2020 17:36:07

%S 1,1,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,0,1,1,1,0,0,

%T 0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,0,0,0,1,1,0,1,0,0,1,1,0,1,0,1,0,

%U 1,0,0,0,0,0,0,0,0,0,0,1,1

%N Parity of digits of Pi.

%H Zak Seidov, <a href="/A030657/b030657.txt">Table of n, a(n) for n = 1..10000</a> [a(10000)=1 corrected by _Georg Fischer_, Jun 22 2020]

%F a(n) = A000035(A000796(n)). - _Omar E. Pol_, Oct 26 2013

%t s = First[RealDigits[N[Pi, 1000]]]; aa = {}; Do[If[OddQ[s[[n]]], AppendTo[aa, 1], AppendTo[aa, 0]], {n, 1, Length[s]}]; aa (* _Artur Jasinski_, Mar 05 2010 *)

%t s= RealDigits[N[Pi, 10000]][[1]];Table[{n,Mod[s[[n]],2]},{n,10000}](* this gives b-file *)(* _Zak Seidov_, Oct 05 2011*)

%Y Cf. A173999, A174000.

%K nonn,base,easy

%O 1,1

%A _Maghraoui Abdelkader_

%E More terms from _Simon Plouffe_.