Does the formula $\sqrt{ 1 + 24n }$ always yield prime? I did some experiments, using C++, investigating the values of $\sqrt{1+24n}$. 

 n: 1 -&gt; 5
 n: 2 -&gt; 7
 n: 5 -&gt; 11
 n: 7 -&gt; 13
 n: 12 -&gt; 17
 n: 15 -&gt; 19
 n: 22 -&gt; 23
 n: 35 -&gt; 29
 n: 40 -&gt; 31
 n: 57 -&gt; 37
 n: 70 -&gt; 41
 n: 77 -&gt; 43
 n: 92 -&gt; 47


I wonder,  if 
$$\sqrt{1+24n}$$ 
is an integer, will it also be a prime?

Is there any interesting theory about this formula?  

Thanks,
Chan
How about $n=26$?

In general, take a composite number of the form $12k+1$ and take $n = k + 6k^2$ to arrive at a contradiction for your statement.

For instance,

$k=2 \Rightarrow n=26 \Rightarrow \sqrt{1+24n} = 25$

$k=4 \Rightarrow n=100 \Rightarrow \sqrt{1+24n} = 49$

$k=7 \Rightarrow n=301 \Rightarrow \sqrt{1+24n} = 85$

and so on.

There are infinite composite numbers of the form $(12k+1)$ which gives infinite counterexamples to your claim.

Your observation though is a nice one, since $24 | (p^2-1)$, $\forall \text{ primes } p &gt; 3$. So you will find that all the primes $&gt;3$ can be written as $\sqrt{1+24n}$.
Right ! I've proven recently this formula which at least englobes all prime numbers for sure. until now I didn't find a prime number that is not written as √24n+1.