OFFSET
1,6
LINKS
Max Alekseyev, PARI scripts
Joerg Arndt, Matters Computational (The Fxtbook), see p. 910.
Dieter Jungnickel, Alfred J. Menezes and Scott A. Vanstone, On the Number of Self-Dual Bases of GF(q^m) Over GF(q), Proc. Amer. Math. Soc. 109 (1990), 23-29.
PROG
(PARI)
/* based on http://home.gwu.edu/~maxal/gpscripts/nsdb.gp by Max Alekseyev */
sdn(m, p) =
/* Number of distinct self-dual normal bases of GF(p^m) over GF(p) where p is prime */
{
local(F, f, g, s, c, d);
if ( p==2 && m%4==0, return(0) );
if ( !(m%p), /* p divides m */
s = m\p;
return( p^((p-1)*(s+(s*(p+1))%2)/2-1) * sdn(s, p) );
, /* else */
F = factormod( (x^m - 1)/(x - 1), p );
c = d = [];
for (i=1, matsize(F)[1],
f = lift(F[i, 1]);
g = polrecip(f);
if ( f==g, c = concat( c, vector(F[i, 2], j, poldegree(f)/2) ); );
if ( lex(Vec(f), Vec(g))==1 ,
d = concat( d, vector(F[i, 2], j, poldegree(f)) );
);
);
return( 2^(p%2) * prod(i=1, #c, p^c[i] + 1) * prod(j=1, #d, p^d[j] - 1) / m );
);
}
vector(66, n, sdn(n, 2)) /* Joerg Arndt, Jul 03 2011 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Feb 11 2008
STATUS
approved