login
A131017
Period 6: repeat [1, 1, 2, -1, 2, 1].
0
1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2, -1, 2, 1, 1, 1, 2
OFFSET
0,3
FORMULA
|a(n)| = A131718(n).
a(n) = A131717(n+1) - A131717(n).
O.g.f.: (1+x+2*x^2-x^3+2*x^4+x^5)/((1-x)*(1+x)*(x^2+x+1)*(x^2-x+1)). - R. J. Mathar, Jul 07 2008
a(n) = (3+2*(-1)^n+cos(n*Pi/3)-3*cos(n*Pi/3)^2+3*sin(n*Pi/3)^2)/3. - Wesley Ivan Hurt, Jun 24 2022
MATHEMATICA
Flatten[Table[{1, 1, 2, -1, 2, 1}, {20}]] (* Wesley Ivan Hurt, Jun 24 2022 *)
PadRight[{}, 120, {1, 1, 2, -1, 2, 1}] (* Harvey P. Dale, Oct 10 2023 *)
CROSSREFS
Sequence in context: A160198 A207709 A131718 * A244227 A214713 A049046
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Sep 23 2007
EXTENSIONS
Edited by R. J. Mathar, Jul 07 2008
STATUS
approved