cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A196686 Number of odd digits of Pi minus number of even digits.

This page as a plain text file.
%I A196686 #31 Feb 23 2025 11:44:58
%S A196686 1,2,1,2,3,4,3,2,3,4,5,4,5,6,7,8,7,8,7,6,5,4,3,2,3,4,3,4,3,4,5,6,5,4,
%T A196686 3,2,1,2,3,4,5,4,5,6,7,8,9,10,11,12,11,12,11,10,9,10,11,10,11,10,9,10,
%U A196686 11,10,11,10,11,10,11,10,9,8,7,6,5,4,3,2,1,2,3,2,1,0,-1,-2,-1,-2,-3,-4,-3,-2,-3,-4,-3,-2
%N A196686 Number of odd digits of Pi minus number of even digits.
%C A196686 Cumulative sum of A030657 with zeros replaced by "-1".
%H A196686 Zak Seidov, <a href="/A196686/b196686.txt">Table of n, a(n) for n = 1..10000</a> [a(10000) corrected by _Georg Fischer_, Dec 29 2021]
%H A196686 Zak Seidov, <a href="https://oeis.org/wiki/File:A196686Fig1.jpg">Dependence a(n) for n = 1..10000</a>
%H A196686 Zak Seidov, <a href="https://oeis.org/wiki/File:A196686Fig2.jpg">Dependence a(n) for n = 1..10^6</a>
%e A196686 Among first 10 digits of Pi, {3,1,4,1,5,9,2,6,5,3}, there are 7 odd and 3 even, hence a(10)=7-3=4.
%t A196686 rd=RealDigits[N[Pi, 10004]][[1]]; a=0; s=Reap[Do[a=a+2Mod[rd[[n]],2]-1; Sow[{n,a}], {n,10004}]][[2,1]] (* this gives b-file *) (* _Zak Seidov_, Oct 05 2011 *)
%t A196686 Module[{nn=100,pid},pid=RealDigits[Pi,10,nn][[1]];Accumulate[If[OddQ[#],1,-1]&/@pid]] (* _Harvey P. Dale_, Feb 23 2025 *)
%Y A196686 Cf. A030657, A175792 (negated), A175813 (indices of 0's).
%K A196686 sign,base
%O A196686 1,2
%A A196686 _Zak Seidov_, Oct 05 2011
%E A196686 Definition amended by _Georg Fischer_, Dec 29 2021