OFFSET
1,4
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
Kevin O'Bryant, Bruce Reznick, and Monika Serbinowska, Almost alternating sums, Amer. Math. Monthly, Vol. 113 (October 2006), 673-688.
MATHEMATICA
Rest[FoldList[Plus, 0, (-1)^Floor[E*Range[120]]]]
Accumulate[(-1)^Floor[E Range[200]]] (* Harvey P. Dale, May 06 2022 *)
PROG
(PARI) vector(50, n, sum(j=1, n, (-1)^(j\exp(-1))) ) \\ G. C. Greubel, Sep 05 2019
(Magma) [&+[(-1)^Floor(j*Exp(1)): j in [1..n]]: n in [1..130]]; // G. C. Greubel, Sep 05 2019
(Sage) [sum((-1)^floor(j*exp(1)) for j in (1..n)) for n in (1..130)] # G. C. Greubel, Sep 05 2019
CROSSREFS
KEYWORD
easy,sign
AUTHOR
T. D. Noe, Oct 11 2006
STATUS
approved