|
|
A130848
|
|
Periodic sequence with period (2, 5, 3, -2, -5, -3).
|
|
1
|
|
|
2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Also binomial transform of periodic sequence with period (2, 3, -5).
Sequence is identical to its third differences.
|
|
LINKS
|
|
|
FORMULA
|
For n > 1, a(n) = a(n-1) - a(n-2).
a(n) = a(n-6).
G.f.: (2+3*x)/(1-x+x^2).
a(n) = 2*cos(Pi*n/3) + (8/3)*3^(1/2)*sin(Pi*n/3). - R. J. Mathar, Nov 15 2007
|
|
MATHEMATICA
|
LinearRecurrence[{1, -1}, {2, 5}, 120] (* or *) PadRight[{}, 120, {2, 5, 3, -2, -5, -3}] (* Harvey P. Dale, Dec 27 2022 *)
|
|
PROG
|
(PARI) {m=104; a=2; b=5; print1(a=2, ", ", b=5, ", "); for(n=2, m, print1(c=b-a, ", "); a=b; b=c)} /* Klaus Brockhaus, Jul 30 2007 */
(Magma) m:=105; [ [2, 5, 3, -2, -5, -3][ (n-1) mod 6 + 1 ]: n in [1..m] ]; /* Klaus Brockhaus, Jul 30 2007 */
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|