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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A194822 a(n) = 3+floor(sum{<((-1)^k)*k*sqrt(3)> : 1<=k<=n}), where < > = fractional part. 4
 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The first negative term is a(1291) = -1. - Georg Fischer, Feb 15 2019 LINKS G. C. Greubel, Table of n, a(n) for n = 1..10000 MATHEMATICA r = GoldenRatio; p[x_] := FractionalPart[x]; f[n_] := 3 + Floor[Sum[p[k*r] (-1)^k, {k, 1, n}]] Table[f[n], {n, 1, 100}] (* A194822 *) PROG (PARI) for(n=1, 50, print1(3 + floor(sum(k=1, n, (-1)^k*frac(k*(1+sqrt(5))/2)), ", ")) \\ G. C. Greubel, Apr 02 2018 (Magma) [3 + Floor((&+[(-1)^k*(k*(1+Sqrt(5))/2 - Floor(k*(1+Sqrt(5))/2)) :k in [1..n]])) : n in [1..50]]; // G. C. Greubel, Apr 02 2018 CROSSREFS Cf. A194821, A194823, A194824. Sequence in context: A089049 A275235 A029420 * A029405 A339383 A198260 Adjacent sequences: A194819 A194820 A194821 * A194823 A194824 A194825 KEYWORD sign 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 March 27 18:55 EDT 2023. Contains 361575 sequences. (Running on oeis4.)