OFFSET
0,2
COMMENTS
When 5*2^n - 1 is prime, that is, n is in A001770, then a(n+1) is in A136539. - Farideh Firoozbakht and M. F. Hasler, Nov 03 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..400
Index entries for linear recurrences with constant coefficients, signature (6,-8)
FORMULA
a(n) = (5*4^n - 2^(n+1) + 0^n)/4.
G.f.: (1 - 2*x + 2*x^2)/((1-2*x)*(1-4*x)).
E.g.f.: (5*exp(4*x) - 2*exp(2*x) + 1)/4.
a(n+1) = 2^n*(5*2^n - 1) for all n >= 0. - M. F. Hasler, Nov 03 2012
MAPLE
seq(coeff(series((1-2*x+2*x^2)/((1-2*x)*(1-4*x)), x, n+1), x, n), n = 0 .. 25); # Muniru A Asiru, Oct 09 2018
MATHEMATICA
Table[If[n==0, 1, 2^(n-2)*(5*2^n - 2)], {n, 0, 30}] (* G. C. Greubel, Oct 08 2018 *)
CoefficientList[Series[(1 - 2*x + 2*x^2)/((1-2*x)*(1-4*x)), {x, 0, 50}], x] (* or *)
CoefficientList[Series[(5*Exp[4*x] - 2*Exp[2*x] + 1)/4, {x, 0, 50}], x]*Table[k!, {k, 0, 50}] (* Stefano Spezia, Oct 11 2018 *)
PROG
(Magma) [5*4^n/4-2^n/2+0^n/4: n in [0..30]]; // Vincenzo Librandi, Jun 15 2011
(PARI) vector(30, n, n--; (5*4^n - 2^(n+1) + 0^n)/4) \\ G. C. Greubel, Oct 08 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, May 19 2003
STATUS
approved