0

Q. Is it the case that for every prime $p$, there is a larger prime $q$ such that $q = p + 4 n$, $n \ge 2$ ?

For example: $5 + 8 = 13$, $13 + 16 = 29$, $29 + 8 = 37$, and so on.

I came upon this constructing a stacked version of Ulam's spiral, arranging that the front-right corner cell of every layer is prime. Continuing this indefinitely requires a positive answer to the posed question.


          Stacked5
          Layer29
          3rd layer, starting with $14$, following $13$ from 2nd layer.

3 Answers3

3

You don't need the full machinery of Dirichlet's Theorem. You can prove that there are infinitely many $4n+1$ primes and infinitely many $4n-1$ primes via a method similar to Euclid's proof that all primes are infinite in number.

Suppose there were only finitely many $4n-1$ primes. Let $\Pi$ be the product of all of them and define $M=2\Pi+1$. Then $M$ is one less than a multiple of $4$ and so must have a $4n-1$ prime factor, but no such factor can be among the primes used to form the product $\Pi$. Therefore there must always be more $4n-1$ primes than those included in any finite list.

The argument for $4n+1$ primes is similar except the polynomial used there is $M=\Pi^2+1$. Here you need some additional theory from modular arithmetic, notably the fact that $-1$ cannot be congruent to any square modulo a $4n-1$ prime.

Oscar Lanzi
  • 39,403
1

There are infinitely many as long as $p \neq 2.$ This is a consequence of Dirichlet's theorem on primes in arithmetic progressions. Any arithmetic progression of the form $a+nd$ contains an infinite number of primes as long as $a$ and $d$ are coprime. In your case, as long as $p \neq 2,$ it is coprime to $4$.

J. W. Tanner
  • 60,406
Ross Millikan
  • 374,822
1

According to Dirichlet's theorem, if $\gcd(4,p)=1$ (i.e., $p\ne2$), there are in fact infinitely many primes of the form $p+4n$.

J. W. Tanner
  • 60,406