%I #22 Sep 08 2022 08:44:49
%S 1,6,45,378,3321,29646,266085,2392578,21526641,193720086,1743421725,
%T 15690618378,141215033961,1270933711326,11438398618965,
%U 102945573221778,926510115949281,8338590914403366,75047317842209805,675425859417626778
%N a(n) = 3^n*(3^n + 1)/2.
%H G. C. Greubel, <a href="/A025551/b025551.txt">Table of n, a(n) for n = 0..750</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (12, -27).
%F From _Philippe Deléham_, Jul 11 2005: (Start)
%F Binomial transform of A081342.
%F 6th binomial transform of (1, 0, 9, 0, 81, 0, 729, 0, . . ).
%F Inverse binomial transform of A081343.
%F a(n) = 12*a(n-1) - 27*a(n-2), a(0) = 1, a(1) = 6.
%F G.f.: (1-6*x)/((1-3*x)*(1-9*x)).
%F E.g.f.: exp(7*x)*cosh(3*x). (End)
%F a(n) = ((6+sqrt(9))^n + (6-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
%F a(n) = Sum_{k=1..3^n} k. - _Joerg Arndt_, Sep 01 2013
%p seq( binomial(3^n +1,2), n=0..20); # _G. C. Greubel_, Jan 08 2020
%t LinearRecurrence[{12,-27}, {1,6}, 20] (* _G. C. Greubel_, Jan 08 2020 *)
%t Table[3^n(3^n+1)/2,{n,0,20}] (* _Harvey P. Dale_, Mar 13 2022 *)
%o (PARI) Vec( (1-6*x)/((1-3*x)*(1-9*x)) + O(x^66) ) \\ _Joerg Arndt_, Sep 01 2013
%o (Magma) [Binomial(3^n+1,2): n in [0..20]]; // _G. C. Greubel_, Jan 08 2020
%o (Sage) [binomial(3^n+1,2) for n in (0..20)] # _G. C. Greubel_, Jan 08 2020
%o (GAP) List([0..20], n-> Binomial(3^n+1,2) ); # _G. C. Greubel_, Jan 08 2020
%Y Cf. A081342, A081343.
%K nonn
%O 0,2
%A _N. J. A. Sloane_