OFFSET
1,2
COMMENTS
Cumulative sum of A030657 with zeros replaced by "-1".
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000 [a(10000) corrected by Georg Fischer, Dec 29 2021]
Zak Seidov, Dependence a(n) for n = 1..10000
Zak Seidov, Dependence a(n) for n = 1..10^6
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
sign,base
AUTHOR
Zak Seidov, Oct 05 2011
EXTENSIONS
Definition amended by Georg Fischer, Dec 29 2021
STATUS
approved