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 (10,-25,0,1).
FORMULA
G.f.: x*(2 - 9*x - 4*x^2)/((1 - 5*x + x^2)*(1 - 5*x - x^2)).
a(n) = (1/2)*((A052918(n) - 2*A052918(n-1)) - (A004254(n+1) - 6*A004254(n))). - G. C. Greubel, Sep 11 2021
MATHEMATICA
M = {{0, 0, 0, 1}, {1, 5, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 5}}; v[1]= {0, 1, 1, 2}; v[n_]:= v[n]= M.v[n-1]; Table[v[n][[1]], {n, 20}]
LinearRecurrence[{10, -25, 0, 1}, {0, 2, 11, 56}, 30] (* Harvey P. Dale, Nov 29 2018 *)
PROG
(Magma) I:=[0, 2, 11, 56]; [n le 4 select I[n] else 10*Self(n-1) - 25*Self(n-2) + Self(n-4): n in [1..31]]; // G. C. Greubel, Sep 11 2021
(Sage)
def A106804_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( x*(2-9*x-4*x^2)/((1-5*x+x^2)*(1-5*x-x^2)) ).list()
A106804_list(30) # G. C. Greubel, Sep 11 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, May 30 2005
EXTENSIONS
Edited by the Associate Editors of the OEIS, Apr 09 2009
Mathematica code fixed by Olivier Gérard, Dec 13 2011
STATUS
approved