OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,0,0,1,-5).
FORMULA
G.f.: ( x*(1+3*x+2*x^3) ) / ( (x-1)*(5*x-1)*(1+x)*(x^2+1) ). - R. J. Mathar, Oct 13 2015
a(n) = 5*a(n-1) + a(n-4) - 5*a(n-5). - Wesley Ivan Hurt, Jun 26 2022
MATHEMATICA
nn=30; With[{c=PadRight[{}, nn, {1, 3, 0, 2}]}, Table[FromDigits[Take[c, n], 5], {n, nn}]] (* Harvey P. Dale, Feb 16 2013 *)
PROG
(PARI) a(n)=([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; -5, 1, 0, 0, 5]^(n-1)*[1; 8; 40; 202; 1011])[1, 1] \\ Charles R Greathouse IV, Jun 02 2026
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved
