OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (13,-39,27).
FORMULA
a(n) = [x^(3^n)] Product_{j=1..3} 1/(1-x^j).
G.f.: (9*x^3+12*x^2-10*x+1)/((1-x)*(1-3*x)*(1-3^2*x)).
a(n) = A001399(3^n) = round((3^n+3)^2/12).
a(n) = 3*A051500(n-1) for n>=1. - Hugo Pfoertner, May 04 2024
EXAMPLE
a(2) = 12: 333, 3222, 3321, 22221, 32211, 33111, 222111, 321111, 2211111, 3111111, 21111111, 111111111.
MAPLE
gf:= (9*x^3+12*x^2-10*x+1)/((1-x)*(1-3*x)*(1-3^2*x)):
a:= n-> coeff(series(gf, x, n+1), x, n):
seq(a(n), n=0..30);
MATHEMATICA
Round[(3^Range[0, 25] + 3)^2/12] (* Paolo Xausa, Jun 26 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 01 2014
STATUS
approved