OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,1,1,1).
FORMULA
a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5).
From R. J. Mathar, Feb 10 2008: (Start)
O.g.f.: -1 - 2/(-1+x+x^2+x^3+x^4+x^5).
a(n) = 2*A001591(n+4) for n>=1. (End)
MATHEMATICA
a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4] + a[n - 5]; a[1] = 2; a[2] = 4; a[3] = 8; a[4] = 16; a[5] = 32; Array[a, 33] (* Robert G. Wilson v, Feb 10 2008 *)
LinearRecurrence[{1, 1, 1, 1, 1}, {2, 4, 8, 16, 32}, 25] (* G. C. Greubel, Oct 15 2016 *)
PROG
(PARI) a(n)=if(n, ([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; 1, 1, 1, 1, 1]^(n-1)*[2; 4; 8; 16; 32])[1, 1], 1) \\ Charles R Greathouse IV, May 20 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
James R FitzSimons (cherry(AT)getnet.net), Feb 07 2008
EXTENSIONS
More terms from Robert G. Wilson v, Feb 10 2008
a(0)=1 prepended by Alois P. Heinz, May 22 2025
STATUS
approved
