Given N>2, find a prime p such that p equiv 1(mod N).(1)

Alberto Calhoun

Alberto Calhoun

Answered question

2022-11-08

Smallest prime in arithmetic progressions: upper bounds?
Given N > 2, find a prime p such that
(1) p 1 ( mod N ) .
(Of course, Dirichlet's theorem assures us that infinitely many such p exist.)
Now, I do not know of a clever way to find such a p, so I suggested simply iterating through the arithmetic progression 1 + k N for k = 0 , 1 , 2 , , and terminating when we hit the first prime number. Clearly, this procedure is efficient if and only if the smallest prime p satisfying (1) is at most N O ( 1 ) . (Edit: This claim is incorrect; see below.) I want to know if such a bound holds or not.
More generally,
Given an integer N, what upper bound do we know on the smallest prime satisfying (1)?
I did a quick check on Wikipedia and Mathworld, but cannot find any relevant results.

Answer & Explanation

Cindy Mercer

Cindy Mercer

Beginner2022-11-09Added 13 answers

Step 1
The relevant results are found under the heading, Linnik's Theorem. Linnik proved that the least prime congruent to a mod d is at most c d L for some absolute constants c and L. The current best bound is L 5.2.
Step 2
On the Generalized Riemann Hypothesis, you can show there's a prime less than ( ϕ ( d ) log d ) 2 , where that's Euler's phi-function. It is conjectured there's always a prime less than d 2 .
Humberto Campbell

Humberto Campbell

Beginner2022-11-10Added 4 answers

Step 1
Gerry Myerson has answered your main question, so I'll address the other part. I don't think that the claim is false, though certainly it's not proven. In any case I wouldn't say it's "very unlikely".
In fact it seems quite likely to me that the smallest k with k n + 1 prime will be O ( ( log n ) 3 ) - indeed, probably even O ( ( log n ) 2 ( log log n ) e ) for some e.
Step 2
Disregarding n < 20, e = 0.18 works up to 30 million with a constant of 1. A braver mathematician might conjecture that it holds for e = 0 and a somewhat larger constant.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?