OFFSET
0,4
COMMENTS
a(n+1) - 3*a(n) = 0,1,0,4,0,16,0,64,.. is an "aerated" version of A000302.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,4,-12).
FORMULA
a(2*n+1) = 3*a(2*n).
a(n) = 3*a(n-1) + 4*a(n-2) - 12*a(n-3).
G.f.: x^2/((1-3*x)*(1-2*x)*(1+2*x)). - Philippe Deléham, Nov 15 2009
E.g.f.: (1/20)*(exp(-2*x) - 5*exp(2*x) + 4*exp(3*x)). - G. C. Greubel, Dec 04 2024
MATHEMATICA
LinearRecurrence[{3, 4, -12}, {0, 0, 1}, 40] (* Harvey P. Dale, Mar 29 2015 *)
PROG
(Magma) [(4*3^n-5*2^n+(-2)^n)/20: n in [0..40] ]; // Vincenzo Librandi, Aug 06 2011
(Python)
def A167910(n): return (4*pow(3, n) - 5*pow(2, n) + pow(-2, n))//20
print([A167910(n) for n in range(41)]) # G. C. Greubel, Dec 04 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 15 2009
EXTENSIONS
Replaced definition by Lava formula of Nov 26 2009. Removed comments about unrelated sequences. - R. J. Mathar, Feb 27 2010
STATUS
approved