A165983 Period 16: repeat 1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4.
1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,1,0,0,0,-1,0,0,0,1).
Crossrefs
Cf. A064038.
Programs
-
Magma
m:=50; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!(( -1-x-x^2-2*x^3-x^8-x^9-x^10-4*x^11 )/((x-1)*(1+x)*(1+x^2)*(x^8+1)))); // G. C. Greubel, Sep 20 2018 -
Mathematica
LinearRecurrence[{0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 1}, {1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4}, 50] (* G. C. Greubel, Apr 20 2016 *)
-
PARI
x='x+O('x^50); Vec(( -1-x-x^2-2*x^3-x^8-x^9-x^10-4*x^11 )/((x-1)*(1+x)*(1+x^2)*(x^8+1))) \\ G. C. Greubel, Sep 20 2018
Formula
a(n) = a(n-4) - a(n-8) + a(n-12). - R. J. Mathar, Dec 17 2010
G.f.: ( -1 - x - x^2 - 2*x^3 - x^8 - x^9 - x^10 - 4*x^11 ) / ( (x-1)*(1+x)*(1+x^2)*(x^8+1) ). - R. J. Mathar, Dec 17 2010
a(4n) = a(4n+1) = a(4n+2) = 1. a(4n+3) = A165207(n).
Comments