OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,1,-1,1).
FORMULA
G.f.: x^2*(3 - x + 4*x^2)/((1 + x)*(1 - 3*x + 2*x^2 - x^3)). - Colin Barker, Nov 02 2012
MATHEMATICA
LinearRecurrence[{2, 1, -1, 1}, {0, 3, 5, 17}, 30] (* Harvey P. Dale, Dec 20 2014 *)
PROG
(PARI) m=30; v=concat([0, 3, 5, 17], vector(m-4)); for(n=5, m, v[n] = 2*v[n-1] +v[n-2] -v[n-3] +v[n-4]); v \\ G. C. Greubel, Nov 03 2018
(Magma) I:=[0, 3, 5, 17]; [n le 4 select I[n] else 2*Self(n-1) +Self(n-2) -Self(n-3) + Self(n-4): n in [1..30]]; // G. C. Greubel, Nov 03 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Jul 20 2007
EXTENSIONS
New name (after Colin Barker) by Franck Maminirina Ramaharo, Nov 02 2018
Edited by N. J. A. Sloane, Nov 03 2018
STATUS
approved