OFFSET
0,2
COMMENTS
Or, number of n X n invertible diagonalizable matrices over GF(3).
REFERENCES
Vladeta Jovovic, The cycle index polynomials of some classical groups, Belgrade, 1995, unpublished.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..60
Geoffrey Critzer, Combinatorics of Vector Spaces over Finite Fields, Master's thesis, Emporia State University, 2018.
Kent E. Morrison, Integer Sequences and Matrices Over Finite Fields, Journal of Integer Sequences, Vol. 9 (2006), Article 06.2.1.
FORMULA
a(n)/A053290(n) is the coefficient of x^n in (Sum_{n>=0} x^n/A053290(n))^2. - Geoffrey Critzer, Aug 05 2017
EXAMPLE
a(2) = 14 because we have: {{0, 1}, {1, 0}}, {{0, 2}, {2, 0}}, {{1, 0}, {0, 1}}, {{1, 0}, {0,2}}, {{1, 0}, {1, 2}}, {{1, 0}, {2, 2}}, {{1, 1}, {0, 2}}, {{1,2}, {0, 2}}, {{2, 0}, {0, 1}}, {{2, 0}, {0, 2}}, {{2, 0}, {1,1}}, {{2, 0}, {2, 1}}, {{2, 1}, {0, 1}}, {{2, 2}, {0, 1}}. - Geoffrey Critzer, Aug 05 2017
MAPLE
T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,
`if`(n=0, 1, T(n-1, k-1)+3^k*T(n-1, k)))
end:
a:= n-> add(3^(k*(n-k))*T(n, k), k=0...n):
seq(a(n), n=0..15); # Alois P. Heinz, Aug 06 2017
MATHEMATICA
nn = 12; g[ n_] := (q - 1)^n q^Binomial[n, 2] FunctionExpand[
QFactorial[n, q]] /. q -> 3; G[z_] := Sum[z^k/g[k], {k, 0, nn}]; Table[g[n], {n, 0, nn}] CoefficientList[Series[G[z]^2, {z, 0, nn}], z] /* Geoffrey Critzer, Aug 05 2017
PROG
(PARI) a(n)={my(v=[1]); for(n=1, n, v=vector(#v+1, k, if(k>1, v[k-1]) + if(k<=#v, 3^(k-1)*v[k]))); sum(k=0, n, 3^(k*(n-k))*v[k+1])} \\ Andrew Howroyd, Mar 02 2018
(Python)
from sympy.core.cache import cacheit
@cacheit
def T(n, k): return 0 if k<0 or k>n else 1 if n==0 else T(n - 1, k - 1) + 3**k*T(n - 1, k)
def a(n): return sum(3**(k*(n - k))*T(n, k) for k in range(n + 1))
print([a(n) for n in range(15)]) # Indranil Ghosh, Aug 06 2017, after Maple code
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Mar 28 2000
EXTENSIONS
More terms from Geoffrey Critzer, Aug 05 2017
STATUS
approved