OFFSET
0,3
COMMENTS
Equals INVERT transform of (1, 3, 4, 4, 4, ...). - Gary W. Adamson, Jan 03 2009
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,2,1).
FORMULA
a(n) = Sum_{m=1..n} Sum_{i=0..n-m} C(m+i-1,m-1)*Sum_{j=0..m} C(j,n-3*m +2*j-i) * C(m,j)*2^(n-3*m+2*j-i), n>0, a(0)=1. - Vladimir Kruchinin, May 12 2011
G.f.: 1 + x/(G(0)-x) where G(k) = 1 - x*(2*k+2)/(1 - 1/(1 + (2*k+2)/G(k+1)));(continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 17 2012
a(n) = 2*a(n-1) + 2*a(n-2) + a(n-3); a(0)=1, a(1)=1, a(2)=4. - Harvey P. Dale, Sep 11 2013
MATHEMATICA
CoefficientList[Series[(1-x)/(1-2x-2x^2-x^3), {x, 0, 30}], x] (* or *) LinearRecurrence[{2, 2, 1}, {1, 1, 4}, 30] (* Harvey P. Dale, Sep 11 2013 *)
PROG
(Maxima) a(n):=sum(sum(binomial(m+i-1, m-1)*sum(binomial(j, n-3*m+2*j-i) *binomial(m, j) *2^(n-3*m+2*j-i), j, 0, m) , i, 0, n-m) , m, 1, n); /* Vladimir Kruchinin, May 12 2011 */
(PARI) Vec((1-x)/(1-2*x-2*x^2-x^3)+O(x^30)) \\ Charles R Greathouse IV, Sep 24 2012
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/( 1-2*x-2*x^2-x^3) )); // G. C. Greubel, Jun 27 2019
(Sage) ((1-x)/(1-2*x-2*x^2-x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019
(GAP) a:=[1, 1, 4];; for n in [4..30] do a[n]:=2*a[n-1]+2*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Jun 27 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved