Ask Your Question
1

Can we find Gaussian primes $\pi = 1 + 8 \mathbb{Z}[i]$ with $N(\pi) < 10000$?

asked 2018-05-23 16:20:36 +0100

jdm06 gravatar image

It's an exercise in computational number theory. Either by hand or by computer, can we find the Gaussian primes $\pi = 1 + 8 \mathbb{Z}[i]$? To keep the list finite I guess we could have $N(\pi) < 10000$.

For example, is $\mathfrak{p} = (1+8i)$ a prime? Or $\mathfrak{p} = (-7 + 8i)$? I don't even know how to index the primes less than these. The norms are $1^2 + 8^2 = 65 = 5 \times 13$ and $(-7)^2 + 8^2 = 113$, so the first could factor and the second does not.

For $\mathfrak{p} = (a + bi)$ to check it is prime over $\mathbb{Z}[i]$, is it sufficient to check that $N(\mathfrak{p}) = a^2 + b^2$ is a prime over $\mathbb{Z}$?

It would be great to see the code in Sage or Pari/GP and that would be an acceptable answer.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-24 19:02:37 +0100

dan_fulea gravatar image

updated 2018-05-24 19:03:41 +0100

Let $a+bi$ be a prime in $\Bbb Z[i]$. We can multiply it with $\pm1$ to have $a\ge 0$. Also, we can pass to the conjugate to have also the case $b\ge 0$. After these norming steps, $0\le a,b$. In case $a < b$, one can multiply with $i$ and renorm. So we are searching for primes of the form $a+ib$ where $0\le b\le a$.

Warming-up: It is simple to see if a number in $\Bbb Z[i]$ is prime or not. Dialog with the sage interpreter:

sage: K.<j> = QuadraticField( -1 )
sage: K(2018 + 2019*j).factor()
(-1) * (86*j - 139) * (-6*j - 5) * (-j - 2)
sage: K(2017).factor()
(-9*j - 44) * (9*j - 44)
sage: 2020.next_prime()
2027
sage: K(2027).factor()
2027
sage: K(2027).is_prime()
True

sage: K(1+8*j).factor()
(-3*j - 2) * (-j - 2)
sage: K(1+8*j).is_prime()
False

sage: K(-7+8*j).factor()
(j) * (7*j + 8)
sage: K(-7+8*j).is_prime()
True

To collect now all "normed" primes of the given shape with "real" and "imaginary" part up to a given bound we can try:

K.<j> = QuadraticField( -1 )
BOUND = 40
my_primes = []

for a in xrange( BOUND/8 ):
    for b in xrange( 1+8*a+1 ):
        p = 1 + 8*a + b*j
        if p.is_prime():
            my_primes.append(p)

for p in my_primes:
    print p

Above, there is a "decent bound", so i can print here the results:

j + 1
4*j + 9
2*j + 17
8*j + 17
10*j + 17
12*j + 17
4*j + 25
6*j + 25
12*j + 25
14*j + 25
16*j + 25
22*j + 25
24*j + 25
2*j + 33
8*j + 33
20*j + 33
28*j + 33
32*j + 33
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-05-23 16:20:09 +0100

Seen: 420 times

Last updated: May 24 '18