OFFSET
0,2
COMMENTS
Number of compositions of n+1 whose parts equal to q can be of q^2 kinds. Example: a(1)=5 because we have (2),(2'),(2"),(2'") and (1,1). Row sums of A105495. - Emeric Deutsch, Apr 10 2005
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-2,1).
FORMULA
G.f.: (1 + x) / (1 - 4*x + 2*x^2 - x^3).
a(n) = 4*a(n-1) - 2*a(n-2) + a(n-3) for n>2. - Colin Barker, Mar 19 2019
MAPLE
read transforms; [seq(n^2, n=1..50)]; INVERT(%);
MATHEMATICA
nn=20; a=(x+x^2)/(1-x)^3; Drop[CoefficientList[Series[1/(1-a), {x, 0, nn}], x], 1] (* Geoffrey Critzer, Aug 31 2012*)
PROG
(PARI) Vec((1 + x) / (1 - 4*x + 2*x^2 - x^3) + O(x^30)) \\ Colin Barker, Mar 19 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved