A026121 a(n) = 3^n*(3^n-1)/2.
0, 3, 36, 351, 3240, 29403, 265356, 2390391, 21520080, 193700403, 1743362676, 15690441231, 141214502520, 1270932117003, 11438393835996, 102945558872871, 926510072902560, 8338590785263203, 75047317454789316, 675425858255365311
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Index entries for linear recurrences with constant coefficients, signature (12,-27).
Programs
-
Magma
[3^n*(3^n-1)/2: n in [0..30]]; // Vincenzo Librandi, May 01 2011
-
Maple
seq(binomial(3^n,2),n=0..19); # Zerinvary Lajos, Jan 07 2008
-
Mathematica
Binomial[3^Range[0,20],2] (* or *) LinearRecurrence[{12,-27},{0,3},30] (* Harvey P. Dale, Oct 07 2012 *)
-
PARI
a(n)=binomial(3^n,2) \\ Charles R Greathouse IV, Jun 11 2015
Formula
a(n) = C(3^n,2), n>=0. - Zerinvary Lajos, Jan 07 2008
a(0) = 0, a(1)=3, a(n)=12*a(n-1)-27*a(n-2). - Harvey P. Dale, Oct 07 2012
G.f.: 3*x / ( (9*x-1)*(3*x-1) ). a(n) = 3*A016142(n-1). - R. J. Mathar, Mar 24 2013
Comments