OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..750
Index entries for linear recurrences with constant coefficients, signature (12, -27).
FORMULA
From Philippe Deléham, Jul 11 2005: (Start)
Binomial transform of A081342.
6th binomial transform of (1, 0, 9, 0, 81, 0, 729, 0, . . ).
Inverse binomial transform of A081343.
a(n) = 12*a(n-1) - 27*a(n-2), a(0) = 1, a(1) = 6.
G.f.: (1-6*x)/((1-3*x)*(1-9*x)).
E.g.f.: exp(7*x)*cosh(3*x). (End)
a(n) = ((6+sqrt(9))^n + (6-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
a(n) = Sum_{k=1..3^n} k. - Joerg Arndt, Sep 01 2013
MAPLE
seq( binomial(3^n +1, 2), n=0..20); # G. C. Greubel, Jan 08 2020
MATHEMATICA
LinearRecurrence[{12, -27}, {1, 6}, 20] (* G. C. Greubel, Jan 08 2020 *)
Table[3^n(3^n+1)/2, {n, 0, 20}] (* Harvey P. Dale, Mar 13 2022 *)
PROG
(PARI) Vec( (1-6*x)/((1-3*x)*(1-9*x)) + O(x^66) ) \\ Joerg Arndt, Sep 01 2013
(Magma) [Binomial(3^n+1, 2): n in [0..20]]; // G. C. Greubel, Jan 08 2020
(Sage) [binomial(3^n+1, 2) for n in (0..20)] # G. C. Greubel, Jan 08 2020
(GAP) List([0..20], n-> Binomial(3^n+1, 2) ); # G. C. Greubel, Jan 08 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved