A174971 Periodic sequence: Repeat 3, -3.
3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (-1).
Crossrefs
Programs
-
Magma
&cat[ [3, -3]: n in [0..41] ]; [ 3*(-1)^n: n in [0..83] ];
-
Mathematica
PadRight[{},120,{3,-3}] (* or *) NestList[-1#&,3,120] (* Harvey P. Dale, Dec 30 2023 *)
-
PARI
a(n)=3*(-1)^n \\ Charles R Greathouse IV, Jun 13 2013
Formula
a(n) = 3*(-1)^n.
a(n) = -a(n-1) for n > 0; a(0) = 3.
a(n) = a(n-2) for n > 1; a(0) = 3, a(1) = -3.
G.f.: 3/(1+x).
Comments