Kloosterman's sum may be defined, for integers u, v, n, by
where
denotes a primitive n-th root of unity.
The following function uses residue class rings
and
cyclotomic fields
to compute such sums.
> Kloosterman := func< u, v, n | > &+[z^(IntegerRing() ! (u*x+v*x^-1)) : x in F | IsUnit(x) ] > where z is RootOfUnity(n, CyclotomicField(n)) > where F is ResidueClassRing(n) >;We can verify the multiplicative identity
> s := Kloosterman(3, 11, 12); > t := Kloosterman(3, 7, 25); > s, t; 2 -5*zeta_25^2 + 5*zeta_25^3 - 5*zeta_25^7 - 5*zeta_25^12 - 5*zeta_25^17 > u := Minimize(Kloosterman(3, 7*12^2+11*25^2, 12*25)); > u; -10*zeta_25^2 + 10*zeta_25^3 - 10*zeta_25^7 - 10*zeta_25^12 - 10*zeta_25^17 > u eq s*t; true;(The Minimize function used above returns a given element of a cyclotomic field in the smallest possible cyclotomic field.)
If one wishes to view the Kloosterman sum as a complex number, one could
use ! to do the conversion (where, by convention,
).
In the above example:
> ComplexField(12) ! u; 14.57937257 - 0.00000013 i
Next Group: Gaussian periods Previous Group: Number fields
Up: Number fields