login
A130844
a(n) = 2*a(n-1) + a(n-2) - a(n-3) + a(n-4), with a(1) = 0, a(2) = 3, a(3) = 5 and a(4) = 17.
8
0, 3, 5, 17, 36, 87, 198, 464, 1075, 2503, 5815, 13522, 31431, 73072, 169868, 394899, 918025, 2134153, 4961300, 11533627, 26812426, 62331332, 144902763, 336858059, 783099975, 1820486578, 4232117835, 9838480332, 22871691896, 53170232867
OFFSET
1,2
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
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