login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123737 Partial sums of (-1)^floor(n*sqrt(2)). 7
-1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1, 2, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, -2, -1, -2, -3, -2, -1, -2, -1, 0, -1, -2, -1, 0, -1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1, 2, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, 0, 1, 0, -1, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,8

COMMENTS

Conjecture: A001652(n) is the index of the first occurrence of n in sequence A123737, A001108(n) is the index of the first occurrence of -n in sequence A123737. - Vaclav Kotesovec, Jun 02 2015

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), pp. 673-688.

FORMULA

O'Bryant, Reznick, & Serbinowska show that |a(n)| <= k log n + 1, with k = 1/(2 log (1 + sqrt(2))), and further -a(n) > k log n + 0.78 infinitely often. - Charles R Greathouse IV, Feb 07 2013

MAPLE

ListTools:-PartialSums([seq((-1)^floor(n*sqrt(2)), n=1..100)]); # Robert Israel, Jun 02 2015

MATHEMATICA

Rest[FoldList[Plus, 0, (-1)^Floor[Sqrt[2]*Range[120]]]]

Accumulate[(-1)^Floor[Range[120]Sqrt[2]]] (* Harvey P. Dale, Jan 16 2012 *)

(* The positions of the first occurrences of n and -n in this sequence: *) stab = Rest[FoldList[Plus, 0, (-1)^Floor[Sqrt[2]*Range[1000000]]]]; Print[Table[FirstPosition[stab, n][[1]], {n, 1, 8}]]; Print[Table[FirstPosition[stab, -n][[1]], {n, 1, 8}]]; (* Vaclav Kotesovec, Jun 02 2015 *)

PROG

(PARI) a(n)=sum(i=1, n, (-1)^sqrtint(2*i^2)) \\ Charles R Greathouse IV, Feb 07 2013

CROSSREFS

Cf. A123724 (sum for 2^(1/3)), A123738 (sum for Pi), A123739 (sum for e).

Cf. A001652, A001951, A228639.

Sequence in context: A215036 A294448 A088568 * A083037 A247477 A072927

Adjacent sequences:  A123734 A123735 A123736 * A123738 A123739 A123740

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 21 22:56 EST 2018. Contains 299427 sequences. (Running on oeis4.)