A025551 a(n) = 3^n*(3^n + 1)/2.
1, 6, 45, 378, 3321, 29646, 266085, 2392578, 21526641, 193720086, 1743421725, 15690618378, 141215033961, 1270933711326, 11438398618965, 102945573221778, 926510115949281, 8338590914403366, 75047317842209805, 675425859417626778
Offset: 0
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 0..750
- Index entries for linear recurrences with constant coefficients, signature (12, -27).
Programs
-
GAP
List([0..20], n-> Binomial(3^n+1,2) ); # G. C. Greubel, Jan 08 2020
-
Magma
[Binomial(3^n+1,2): n in [0..20]]; // G. C. Greubel, Jan 08 2020
-
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 *)
-
PARI
Vec( (1-6*x)/((1-3*x)*(1-9*x)) + O(x^66) ) \\ Joerg Arndt, Sep 01 2013
-
Sage
[binomial(3^n+1,2) for n in (0..20)] # G. C. Greubel, Jan 08 2020
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