login
A117452
Periodic {2, -1, 1, 0, 0} - 0^n.
2
1, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0, 0, 2, -1, 1, 0
OFFSET
0,6
COMMENTS
For this entry, it is understood that 0^0 = 1 and 0^n = 0 for all n > 0. - Alonso del Arte, Mar 18 2018
FORMULA
G.f.: (1 - x + x^2 + x^5)/(1 - x^5).
From G. C. Greubel, Jun 03 2021: (Start)
a(n) = A117450(n) - 2*A117450(n-1) + A117450(n-2) (second difference of A117450).
a(n) = A117451(n) - A117451(n-1). (End)
MATHEMATICA
ReplaceAll[3 -> -1][RealDigits[464 + 240/341, 4, 100][[1]]] (* Alonso del Arte, Mar 18 2018 *)
LinearRecurrence[{0, 0, 0, 0, 1}, {1, -1, 1, 0, 0, 2}, 120] (* or *) PadRight[{1}, 120, {2, -1, 1, 0, 0}] (* Harvey P. Dale, Jun 25 2023 *)
CROSSREFS
Partial sums are A117451. Second partial sums are A117450.
Sequence in context: A152800 A223730 A353129 * A029412 A368571 A178670
KEYWORD
easy,sign
AUTHOR
Paul Barry, Mar 16 2006
STATUS
approved