OFFSET
1,6
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{k=1..n} (-1)^A001113(k).
EXAMPLE
a(6) = (-1)^2 + (-1)^7 + (-1)^1 + (-1)^8 + (-1)^2 + (-1)^8 =2.
MAPLE
Digits := 100:
A001113 := proc(n)
floor(exp(1)*10^(n-1)) mod 10;
end proc:
A175793 := proc(n)
add((-1)^A001113(k), k=1..n) ;
end proc: # R. J. Mathar, Jul 10 2012
MATHEMATICA
Rest@ FoldList[ Plus, 0, (-1)^First@ RealDigits[E, 10, 200]]
Accumulate[If[EvenQ[#], 1, -1]&/@RealDigits[E, 10, 90][[1]]] (* Harvey P. Dale, Sep 09 2014 *)
CROSSREFS
KEYWORD
base,sign
AUTHOR
Michel Lagneau, Sep 06 2010
STATUS
approved