Computations for Katz' Observations


Computations of Gaussian Primes

This document presents some computations on the "cumulative distribution" function of normalized spacings between angles of Gaussian primes, as defined by N. Katz in a lecture given at Princeton on October 12, 1994. For my own notes on the substance of this lecture, see

Notes on N. Katz' Lecture

Here we present some plots computed using PARI. The code may be found here:

gaussprime.gp

Below is a description of the routines defined above:

listangles(m,n)
This outputs a vector of all the angles of gaussian primes of norm between m and n (up to symmetry) sorted into increasing order.
spacings(m,n)
This outputs a vector of all the normalized spacings for norm between m and n (up to symmetry) sorted into increasing order.
compar(m,n)
This computes the cumulative distribution and compares the values with a conjectural formula
plotcompar(m,n)
This plots the functions (on screen) computed in compar(m,n)
Note that in PARI, to prepare a PostScript file from the currently viewed picture one gives the command postdraw([0,0,0]). The PostScript plots displayed below (as GIFs) were slightly edited thereafter.


Plot for m=1, n=100,000

The thick curve is the cumulative distribution function of the spacings for the gaussian primes, while the thin curve is the possible limiting exponential curve.


Plot for m=1, n=500,000


Plot for m=1, n=1,000,000


Note that convergence is particularly bad for small and large t.

Plot for m=1,000,000, n=1,100,000


Convergence improves if we take a large range of large primes.


Other sequences

Out of general curiosity, we also tried the calculation of the cumulative distribution of spacings for nx - floor(nx) for irrational values of x. The behavior is considerably different; apparently, the cumulative distribution commonly resembles a step function.

The code for this case is

irratangle.gp

A sample plot is given below for x=sqrt(3) and m=100,000, n=110,000

Similar pictures appear for other values of x (such as cube root of 3 or Pi). I have found no value of x where anything like an exponential function appears. I think it may be possible to use the theory of continued fractions to prove the above distribution function is in fact a step function.


David Wright Email
Last modified: Tue Nov 25 20:14:20 CST 2003