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.

Showing 1-2 of 2 results.

A175813 Numbers m such that the first m decimal digits of Pi contain equal numbers of even and odd decimal digits.

Original entry on oeis.org

84, 576, 578, 580, 582, 646, 654, 682, 684, 686, 688, 690, 692, 694, 696, 698, 700, 702, 706, 722, 736, 740, 742, 2406, 2408, 2414, 2416, 2430, 2432, 2438, 2440, 2502, 2504, 2506, 2512, 2514, 2516, 2518, 2522, 2524, 2540, 2542, 2546, 2548, 2756, 2758, 2762
Offset: 1

Views

Author

Michel Lagneau, Sep 09 2010

Keywords

Comments

Is this sequence infinite?

Examples

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

Crossrefs

Cf. A175792.

Programs

  • Mathematica
    L= Rest@FoldList[ Plus, 0, (-1)^First@ RealDigits[Pi, 10, 3000]] ;Do[If [L[[n]]==0,Print[n]],{n,3000}]
    Position[Accumulate[If[EvenQ[#],1,-1]&/@(RealDigits[Pi,10,3000][[1]])],0]//Flatten (* Harvey P. Dale, Jan 10 2024 *)

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Zak Seidov, Oct 05 2011

Keywords

Comments

Cumulative sum of A030657 with zeros replaced by "-1".

Examples

			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.
		

Crossrefs

Cf. A030657, A175792 (negated), A175813 (indices of 0's).

Programs

  • Mathematica
    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 *)
    Module[{nn=100,pid},pid=RealDigits[Pi,10,nn][[1]];Accumulate[If[OddQ[#],1,-1]&/@pid]] (* Harvey P. Dale, Feb 23 2025 *)

Extensions

Definition amended by Georg Fischer, Dec 29 2021
Showing 1-2 of 2 results.