OFFSET
0,8
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1, -1, 1, 3, 3, 2, -1, -2, -2, -1).
FORMULA
a(n) = a(n-3)+a(n-4)+b(n) where b(n) is the 12-cycle (1,0,1,0,1,1,0,0,2,0,0,1) starting with initial value b(11)=1 and b(n)=b(n-12) e.g. b(23)=b(11). The initial values for a(n) are a(7)=2,a(8)=0,a(9)=0,a(10)=3.
G.f.: x^7*(x^3+2*x^2+2*x+2) / ((x-1)*(x+1)*(x^2+1)*(x^2+x+1)*(x^4+x^3-1)). - Colin Barker, Jul 24 2014
EXAMPLE
a(16)=5, the compositions being 43333, 34333, 33433, 33343, 33334.
MATHEMATICA
CoefficientList[Series[x^7 (x^3 + 2 x^2 + 2 x + 2)/((x - 1) (x + 1) (x^2 + 1) (x^2 + x + 1) * (x^4 + x^3 - 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Jul 25 2014 *)
PROG
(PARI) a=[0, 0, 0, 0, 0, 0, 2, 0, 0, 3]; b=[1, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1]; k=1; for(n=11, 100, a=concat(a, a[n-3]+a[n-4]+b[k]); if(k==#b, k=1, k++)); a \\ Colin Barker, Jul 24 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Neil McGrath, Jul 23 2014
EXTENSIONS
More terms from Colin Barker, Jul 24 2014
STATUS
approved