OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
A. Ilic, S. Klavzar, Y. Rho, Generalized Lucas Cubes, Appl. An. Disc. Math. 6 (2012) 82-94. Proposition 11.
Index entries for linear recurrences with constant coefficients, signature (2,1,0,-3,-2,-1).
FORMULA
G.f.: x*(1+2*x-6*x^3+2*x^4+8*x^5+5*x^6+2*x^7)/(1-x-x^2-x^3)^2. - Colin Barker, Nov 21 2012
MAPLE
VG := proc(n)
option remember;
if n <= 5 then
op(n+1, [1, 2, 4, 7, 11, 21]) ;
else
procname(n-1)+procname(n-2)+procname(n-3) ;
end if;
end proc:
EG := proc(n)
option remember;
if n <= 5 then
op(n+1, [0, 1, 4, 9, 16, 40]) ;
else
procname(n-1)+procname(n-2)+procname(n-3)+VG(n-2)+2*VG(n-3) ;
end if;
end proc:
seq(EG(n), n=0..60) ;
MATHEMATICA
CoefficientList[Series[x*(2*x^7+5*x^6+8*x^5+2*x^4-6*x^3+2*x+1)/(x^3+x^2+ x-1)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Dec 23 2012 *)
LinearRecurrence[{2, 1, 0, -3, -2, -1}, {0, 1, 4, 9, 16, 40, 90, 189, 400}, 50] (* Harvey P. Dale, Jun 20 2021 *)
PROG
(PARI) my(x='x+O('x^40)); concat([0], Vec(x*(1+2*x-6*x^3+2*x^4+8*x^5 +5*x^6+2*x^7)/(1-x-x^2-x^3)^2)) \\ G. C. Greubel, Apr 23 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x*(1+2*x-6*x^3+2*x^4+8*x^5 +5*x^6+2*x^7)/(1-x-x^2-x^3)^2 )); // G. C. Greubel, Apr 23 2019
(Sage) (x*(1+2*x-6*x^3+2*x^4+8*x^5 +5*x^6+2*x^7)/(1-x-x^2-x^3)^2 ).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 23 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
R. J. Mathar, Nov 19 2012
STATUS
approved