OFFSET
1,2
COMMENTS
First primes are a(11)=264353 and a(17)=193622861. More primes?
Additional primes: a(71), a(91), a(431). - Harvey P. Dale, Jan 24 2013
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,5,-6).
FORMULA
a(n) = (9*3^n + 4*(-2)^n - 13)/6.
From G. C. Greubel, May 10 2019: (Start)
a(n) = 2*a(n-1) + 5*a(n-2) - 6*a(n-3).
G.f.: x*(1 + 12*x)/((1-x)*(1+2*x)*(1-3*x)).
E.g.f.: (4*exp(-2*x) - 13*exp(x) + 9*exp(3*x))/6. (End)
MATHEMATICA
Accumulate[Table[3^i+(-2)^i, {i, 30}]] (* Harvey P. Dale, Jan 24 2013 *)
PROG
(PARI) {a(n) = (9*3^n + 4*(-2)^n - 13)/6}; \\ G. C. Greubel, May 10 2019
(Magma) [(9*3^n + 4*(-2)^n - 13)/6: n in [1..30]]; // G. C. Greubel, May 10 2019
(Sage) [(9*3^n + 4*(-2)^n - 13)/6 for n in (1..30)] # G. C. Greubel, May 10 2019
(GAP) List([1..30], n-> (9*3^n + 4*(-2)^n - 13)/6) # G. C. Greubel, May 10 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Apr 14 2007
STATUS
approved