OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1027
Index entries for linear recurrences with constant coefficients, signature (3,-1,-2).
FORMULA
G.f.: (2 -3*x -x^2)/((1-2*x)*(1-x-x^2)).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3).
a(n) = 2^n + Sum_{alpha=RootOf(-1+z+z^2)} (1 + 2*alpha)*alpha^(-1-n)/5.
MAPLE
spec:= [S, {S=Union(Sequence(Union(Prod(Z, Z), Z)), Sequence(Union(Z, Z)))}, unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);
with(combinat); seq(2^n + fibonacci(n+1), n=0..40); # G. C. Greubel, Oct 22 2019
MATHEMATICA
LinearRecurrence[{3, -1, -2}, {2, 3, 6}, 40] (* or *) Table[Fibonacci[n+1] + 2^n, {n, 0, 40}] (* G. C. Greubel, Oct 22 2019 *)
PROG
(PARI) vector(41, n, fibonacci(n) + 2^(n-1)) \\ G. C. Greubel, Oct 22 2019
(Magma) [2^n + Fibonacci(n+1): n in [0..40]]; // G. C. Greubel, Oct 22 2019
(Sage) [2^n + fibonacci(n+1) for n in (0..40)] # G. C. Greubel, Oct 22 2019
(GAP) List([0..40], n-> 2^n + Fibonacci(n+1) ); # G. C. Greubel, Oct 22 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
STATUS
approved