OFFSET
0,1
COMMENTS
Inverse binomial transform is (-1)^n * a(n). - Michael Somos, Jun 02 2014
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,3,-4,1).
FORMULA
G.f.: 2*(2-x)*(1+x)*(1-2*x)/((1-3*x+x^2)*(1+x-x^2)). - Colin Barker, Aug 19 2012
a(n) = 2*a(n-1)+3*a(n-2)-4*a(n-3)+a(n-4). - Colin Barker, Aug 20 2012
a(-n) = A124697(n) if n>0. - Michael Somos, Jun 02 2014
EXAMPLE
G.f. = 4 + 2*x + 10*x^2 + 14*x^3 + 54*x^4 + 112*x^5 + 340*x^6 + ...
MAPLE
MATHEMATICA
a[n_] := ((Sqrt[5] + 3)^n + (-Sqrt[5] - 1)^n + (-Sqrt[5] + 3)^n + (Sqrt[5] - 1)^n)/2^n; Table[a[n] // Simplify, {n, 0, 29}] (* Jean-François Alcover, Jul 02 2013 *)
LinearRecurrence[{2, 3, -4, 1}, {4, 2, 10, 14}, 50] (* G. C. Greubel, Apr 23 2018 *)
PROG
(Sage)
def A215500(x) :
return ((sqrt(5)+3)^x+(-sqrt(5)-1)^x+(-sqrt(5)+3)^x+(sqrt(5)-1)^x)/2^x
[A215500(i).round() for i in (0..29)]
(PARI) {a(n) = polsym( (1 + (-1)^(n>0)*x - x^2) * (1 - 3*x + x^2), abs(n))[1 + abs(n)]}; /* Michael Somos, Jun 02 2014 */
(Magma) I:=[4, 2, 10, 14]; [n le 4 select I[n] else 2*Self(n-1) + 3*Self(n-2) - 4*Self(n-3) + Self(n-4): n in [1..30]]; // G. C. Greubel, Apr 23 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Aug 13 2012
STATUS
approved