login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123738 Partial sums of (-1)^floor(n*Pi). 4
-1, 0, -1, 0, -1, 0, -1, -2, -1, -2, -1, -2, -1, -2, -3, -2, -3, -2, -3, -2, -3, -4, -3, -4, -3, -4, -3, -4, -5, -4, -5, -4, -5, -4, -5, -6, -5, -6, -5, -6, -5, -6, -7, -6, -7, -6, -7, -6, -7, -8, -7, -8, -7, -8, -7, -8, -9, -8, -9, -8, -9, -8, -9, -10, -9, -10, -9, -10, -9, -10, -11, -10, -11, -10, -11, -10, -11, -12, -11, -12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,8
LINKS
Kevin O'Bryant, Bruce Reznick and Monika Serbinowska, Almost alternating sums, arXiv:math/0308087 [math.NT], 2003-2005.
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[Pi*Range[120]]]]
PROG
(PARI) vector(130, n, sum(j=1, n, (-1)^(j\(1/Pi))) ) \\ G. C. Greubel, Sep 05 2019
(Magma) R:= RealField(20); [&+[(-1)^Floor(j*Pi(R)): j in [1..n]]: n in [1..130]]; // G. C. Greubel, Sep 05 2019
(Sage) [sum((-1)^floor(j*pi) 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)), A123739 (sum for e).
Sequence in context: A275344 A206826 A175835 * A194511 A214526 A245038
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 December 11 14:18 EST 2023. Contains 367727 sequences. (Running on oeis4.)