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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A194821 a(n) = 1+floor(sum{<((-1)^k)*k*sqrt(2)> : 1<=k<=n}), where < > = fractional part. 4
 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 0, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 0, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 0, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,6 COMMENTS Does 0 occur infinitely many times? Is the sequence unbounded? LINKS G. C. Greubel, Table of n, a(n) for n = 1..10000 MATHEMATICA r = Sqrt[2]; p[x_] := FractionalPart[x]; f[n_] := 1 + Floor[Sum[p[k*r] (-1)^k, {k, 1, n}]] Table[f[n], {n, 1, 100}] (* A194821 *) PROG (PARI) for(n=1, 50, print1(1 + floor(sum(k=1, n, (-1)^k*frac(k*sqrt(2))), ", ")) \\ G. C. Greubel, Apr 02 2018 (Magma) [1 + Floor((&+[(-1)^k*(k*Sqrt(2) - Floor(k*Sqrt(2))) :k in [1..n]])) : n in [1..50]]; // G. C. Greubel, Apr 02 2018 CROSSREFS Cf. A194822, A194823, A194824. Sequence in context: A090464 A277967 A196049 * A044934 A124761 A333925 Adjacent sequences: A194818 A194819 A194820 * A194822 A194823 A194824 KEYWORD nonn AUTHOR Clark Kimberling, Sep 03 2011 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.

Last modified January 27 12:24 EST 2023. Contains 359840 sequences. (Running on oeis4.)