A132677 Period 3: repeat [1, 2, -3].
1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3, 1, 2, -3
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (-1,-1).
Programs
-
Magma
&cat [[1, 2, -3]^^30]; // Wesley Ivan Hurt, Jul 01 2016
-
Maple
seq(op([1, 2, -3]), n=0..50); # Wesley Ivan Hurt, Jul 01 2016 A132677 := proc(n) op(1+modp(n,3),[1,2,-3]) ; end proc: # R. J. Mathar, Mar 14 2025
-
Mathematica
PadRight[{}, 100, {1, 2, -3}] (* Wesley Ivan Hurt, Jul 01 2016 *)
-
PARI
a(n)=[1,2,-3][1+n%3] \\ Jaume Oliver Lafont, Mar 24 2009
Formula
G.f.: (1+3*x)/(1+x+x^2). - Jaume Oliver Lafont, Mar 24 2009
a(n) = cos(2*Pi*n/3) + 5*sin(2*Pi*n/3)/sqrt(3). - R. J. Mathar, Oct 08 2011
a(n) + a(n-1) + a(n-2) = 0 for n > 1, a(n) = a(n-3) for n > 2. - Wesley Ivan Hurt, Jul 01 2016
Comments