OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Paul Curtz, Comments on this sequence
Index entries for linear recurrences with constant coefficients, signature (5,-9,6).
FORMULA
G.f.: x*(1-x)^3/((1-2*x)*(1-3*x+3*x^2)). [multiplied by x to match the offset by R. J. Mathar, Jul 22 2009]
a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 7; for n > 4, a(n) = 5*a(n-1) - 9*a(n-2) + 6*a(n-3).
Binomial transform of A088911. - Klaus Brockhaus, Jun 17 2007
a(n+1) = A057083(n)/3+2^(n-1), n > 1. - R. J. Mathar, Jul 22 2009
EXAMPLE
First seven rows of T are
[ 1 ]
[ 1, 2 ]
[ 1, 2, 4 ]
[ 0, 1, 3, 7 ]
[ 0, 0, 1, 4, 11 ]
[ 0, 0, 0, 1, 5, 16 ]
[ 1, 1, 1, 1, 2, 7, 23 ].
MATHEMATICA
a[n_] := 2^(n-2) + 2*3^((n-3)/2)*Sin[n*Pi/6]; a[1]=1; Table[a[n], {n, 1, 33}] (* Jean-François Alcover, Aug 13 2012 *)
CoefficientList[Series[(1 - x)^3 / ((1 - 2 x) (1 - 3 x + 3 x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 13 2018 *)
PROG
(PARI) {m=33; v=concat([1, 2, 4, 7], vector(m-4)); for(n=5, m, v[n]=5*v[n-1]-9*v[n-2]+6*v[n-3]); v} \\ Klaus Brockhaus, Jun 10 2007
(Magma) m:=33; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n, n]: n in [1..m] ]; // Klaus Brockhaus, Jun 10 2007
(Magma) m:=33; S:=[ [1, 1, 1, 0, 0, 0][(n-1) mod 6 + 1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; // Klaus Brockhaus, Jun 17 2007
(Magma) I:=[1, 2, 4, 7]; [n le 4 select I[n] else 5*Self(n-1)-9*Self(n-2)+6*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 13 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, May 28 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus, Jun 10 2007
STATUS
approved