OFFSET
0,2
COMMENTS
Row sums of generalized Pascal matrix A103141.
Generalized Pell numbers.
Row sums of the tetranacci convolution triangle A202193. - Philippe Deléham, Feb 16 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..500
Brian Hopkins and Stéphane Ouvry, Combinatorics of Multicompositions, arXiv:2008.04937 [math.CO], 2020.
Index entries for linear recurrences with constant coefficients, signature (2,1,1,1).
FORMULA
a(n) = 2*a(n-1) + a(n-2) + a(n-3) + a(n-4).
G.f.: 1/(1 - 2*x - x^2 - x^3 - x^4).
MAPLE
m:=40; S:=series(1/(1-2*x-x^2-x^3-x^4), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Feb 12 2020
MATHEMATICA
LinearRecurrence[{2, 1, 1, 1}, {1, 2, 5, 13}, 40] (* Vladimir Joseph Stephan Orlovsky, Jun 20 2011 *)
PROG
(PARI) Vec(1/(1-2*x-x^2-x^3-x^4)+O(x^40)) \\ Charles R Greathouse IV, Jun 20 2011
(Magma) I:=[1, 2, 5, 13]; [n le 4 select I[n] else 2*Self(n-1)+Self(n-2)+Self(n-3) +Self(n-4): n in [1..40]]; // Vincenzo Librandi, Feb 05 2012
(Sage)
def A103142_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/(1-2*x-x^2-x^3-x^4) ).list()
A103142_list(40) # G. C. Greubel, Feb 12 2020
(GAP) a:=[1, 2, 5, 13];; for n in [5..40] do a[n]:=2*a[n-1]+a[n-2]+a[n-3]+a[n-4]; od; a; # G. C. Greubel, Feb 12 2020
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jan 24 2005
EXTENSIONS
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021
STATUS
approved