# Primes of the form $4x+1$

For a given $n$, i am trying to find a constant value $c$ such that you can always find a prime $p$ of the form $4x+1$ for some $x \in \mathbb{Z}_+$ and $n < p < cn$. I want to find the smallest such $c$ for which the above property holds for all values of $n$.

I searched in literature, i could only find that $(n!)^2+1$ has a prime divisor $p$ of the form $4x+1$ and $n < p < (n!)^2+1$. But $n!$ upper bound is huge for my need.

Also i found that we can find a prime $p$ of the form $4x+1$ such that $n< p < (p_1...p_k)^2+1$ where $p_1,...,p_k$ are all the prime numbers of the form $4x+1$ and less than $n$. This upper bound of $(p_1...p_k)^2+1$ is also large for my need.

Also i found some asymptotic formulas but i want formulas which holds for all numbers.

It would be great if i can find a constant $c$ such that there is always a prime of the form $4x+1$ between $n$ and $cn$ and the property holds for all $n$.

• Using the prime number theorem in arithmetic progressions one can show that any $c>1$ will work for large enough $n$. – Wojowu Nov 5 '17 at 12:08
• There certainly exist methods to produce some value of $c$ that works for every $n$, but it is likely to be massive. What exactly do you need? Even better estimates (i.e., primes in short intervals in arithmetic progression) exist if you are willing to neglect all but finitely many values of $n$. – Stanley Yao Xiao Nov 5 '17 at 16:05
• If you just need a constant c, try getting one from sampling. The first million primes should give you a good estimate. If you want a proof, try looking at prime number races. Gerhard "And Be Careful About Betting" Paseman, 2017.11.05. – Gerhard Paseman Nov 5 '17 at 16:54
• Also, some variant on Bertrand's postulate should hold for all but finitely many n, in which case c should be less than 14/5. Gerhard "Small Cases Are The Problem" Paseman, 2017.11.05. – Gerhard Paseman Nov 5 '17 at 16:59
• Erdos "Uber die Primzahlen gewisser arithmetischer Reihen" Math Z. (1935) Satz 9: There is a prime of the form $4x+1$ between $n$ and $2n$ if $n >6000$. You can figure out your $c$ just by looking at numbers up to $6000$ from this. – Felipe Voloch Nov 5 '17 at 22:28

I feel bad posting this as an answer, but: using Felipe's reference, the last number for which there is not a prime equal to $1 \mod 4$ between $n$ and $2n-1$ (inclusive) is $6$. For $6$ the first such number is $13,$ for $1$ it is $5,$ and for $2$ it is also $5.$ So, if you care about $1,$ the best constant is $6,$ if you care about $2$ but not $1,$ it is $3,$ and if you care about $6$ but neither $1$ nor $2,$ the best is $7/3.$