OFFSET
0,3
COMMENTS
This is the sequence A(1,1;1,2;3) of the family of sequences [a,b:c,d:k] considered by G. Detlefs, and treated as A(a,b;c,d;k) in the W. Lang link given below. - Wolfdieter Lang, Oct 18 2010
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Wolfdieter Lang, Notes on certain inhomogeneous three term recurrences.
Index entries for linear recurrences with constant coefficients, signature (2,1,-2).
FORMULA
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
a(n+1) - a(n) = 5*A001045(n), Jacobsthal numbers.
a(n+1) - 2*a(n) = (-1)^(n+1)* A010685(n).
From R. J. Mathar, Jul 10 2008: (Start)
O.g.f.: (1-x+3*x^2)/((x-1)*(2*x-1)*(1+x)).
a(n) = (5*2^(n+1) - 9 + 5*(-1)^n)/6. (End)
a(n) = a(n-1) + 2*a(n-2) +3, n>1 - Gary Detlefs, Jun 20 2010
MATHEMATICA
Table[(5*2^(n+1) -9 + 5*(-1)^n)/6, {n, 0, 50}] (* G. C. Greubel, Oct 10 2017 *)
LinearRecurrence[{2, 1, -2}, {1, 1, 6}, 40] (* Harvey P. Dale, Mar 24 2021 *)
PROG
(PARI) for(n=0, 50, print1((5*2^(n+1) -9 + 5*(-1)^n)/6, ", ")) \\ G. C. Greubel, Oct 10 2017
(Magma) [(5*2^(n+1) -9 + 5*(-1)^n)/6: n in [0..50]]; // G. C. Greubel, Oct 10 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Jun 24 2008
EXTENSIONS
Extended by R. J. Mathar, Jul 10 2008
STATUS
approved