OFFSET
0,3
COMMENTS
In general k^(n-1)*J(n), where J(n) = A001045(n), is given by ((2*k)^n - (-k)^n)/(3*k) with g.f. x/((1+k*x)*(1-2*k*x)).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..925
Index entries for linear recurrences with constant coefficients, signature (6,72).
FORMULA
G.f.: x/((1+6*x)*(1-12*x)).
a(n) = 6^(n-1)*Sum_{k=0..floor((n-1)/2)} binomial(n-k-1, k) * 2^k.
a(n) = (12^n - (-6)^n)/18.
a(n) = 6^(n-1)*A001045(n).
E.g.f.: (1/18)*(exp(12*x) - exp(-6*x)). - G. C. Greubel, Feb 18 2023
MATHEMATICA
LinearRecurrence[{6, 72}, {0, 1}, 40] (* G. C. Greubel, Feb 18 2023 *)
PROG
(Magma) [(12^n - (-6)^n)/18: n in [0..40]]; // G. C. Greubel, Feb 18 2023
(SageMath) [(12^n - (-6)^n)/18 for n in range(41)] # G. C. Greubel, Feb 18 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 29 2004
STATUS
approved