The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123739 Partial sums of (-1)^floor(n*e). 4
1, 0, 1, 2, 1, 2, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
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
Cf. A123724 (sum for 2^(1/3)), A123737 (sum for sqrt(2)), A123738 (sum for pi).
Sequence in context: A234694 A091704 A175799 * A165575 A165582 A165472
KEYWORD
easy,sign
AUTHOR
T. D. Noe, Oct 11 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 1 12:00 EDT 2024. Contains 373018 sequences. (Running on oeis4.)