How many primes in the first 6000 primes have a particular property

How many prime numbers are there in the first $6000$ prime numbers that are the quotients of other prime numbers in the following way $(P_1^2-1)/(P_2^2-1)=P_3$ where $P_1$ , $P_2$ and $P_3$ are different prime numbers.

• Title makes me want to say, "$6000$." :) Jul 2 '13 at 19:14
• Are $P_1,P_2$ also in the range of the first $6000$ primes, or can they be outside that range? Jul 2 '13 at 19:15
• Oh, but that makes it boring. It would be so much more fun to allow $p_1$ and $p_2$ to be arbitrarily large. Jul 2 '13 at 19:31
• Of course, you have the right to ask any on topic question you want, but making the range of $(p_1, p_2)$ finite makes this into an easy programming task instead of a mathematical challenge. Jul 2 '13 at 19:51
• @DavidSpeyer : What about $(14^2-1)/(4^2-1)=13$? (such solutions correspond to negative values of $n$ in your answer below). Unfortunately, these don't seem to produce prime pairs either. Jul 2 '13 at 21:50

I count 77 solutions: 2, 3, 5, 7, 11, 19, 23, 29, 31, 41, 43, 47, 53, 59, 61, 67, 79, 89, 103, 113, 127, 131, 167, 173, 193, 211, 227, 239, 271, 281, 283, 409, 419, 431, 439, 443, 463, 547, 571, 601, 617, 619, 677, 743, 761, 1013, 1051, 1223, 1231, 1289, 1381, 1409, 1559, 1597, 1613, 1933, 2003, 2111, 2311, 2351, 2411, 2549, 2551, 2791, 2857, 2927, 2969, 4831, 5059, 5801, 5903, 6373, 8191, 9901, 10973, 17291, 23561

• there's many more Jul 2 '13 at 22:48
• With the restriction that $p_1$, $p_2 \leq \mathrm{Prime}[6000] = 59359$, I get the same list as Charles. Which prime do you think should be there but isn't? Jul 2 '13 at 23:27
• The number 2 has 2 solutions or can be expressed 2 different ways with 4 different primes. The number 3 can be expressed four different ways with 8 different primes for starters. Number 11 has 3 solutions, number 47 has 2 solutions 31 has 2 solutions number 7 has 3 solutions Jul 2 '13 at 23:49
• @Kelly You might want to rephrase the question then; as it stands now, it's asking for the number of primes $P_3$, not about the number of different triplets $(P_1,P_2,P_3)$. Jul 3 '13 at 6:40

Some observations: With the restriction that $p_1$ and $p_2$ be in the first $6000$ primes, Charles is of course correct. Here it it in one line of Mathematica:

Union[Select[
Flatten[
Table[(Prime[j]^2 - 1)/(Prime[i]^2 - 1), {j, 1, 6000}, {i, 1, j}]],
PrimeQ]]


Without this restriction, it is hard to prove that there is any prime NOT of this form. For any prime $p$, there are infinitely many solutions to the equation $(x^2-1)/(y^2-1)=p$ without the requirement that $p$ is prime. Namely, the given equation is equivalent to $x^2 - p y^2 = 1-p$ (except that $(1,1)$ is a solution to the latter and not the original equation.) Let $(u,v)$ solve Pell's equation $u^2-p v^2 = 1$. Then taking $x+y \sqrt{p}= (1+\sqrt{p})(u+v \sqrt{p})^n$, we have $u^2-p v^2 = p-1$. There might also be other solutions, depending on the prime factorization of $p-1$.

For $p=13$, I believe that all solutions to $x^2-13 y^2 = -12$ are of the form $x+\sqrt{13} y = ((11+3 \sqrt{13})/2)^n (1+\sqrt{13})$. For the first $30$ values of $n$, which gets me up to $30$ digits numbers, none of the pairs $(x,y)$ are $(\mathrm{prime}, \mathrm{prime})$. (EDIT: PeterKošinár above points out that I should also check negative $n$, which I haven't gotten around to doing systematically.) However, I see no obstacle to them being so.

I can't even figure out whether or not I expect there to be infinitely many such primes.

• After seeing your comment, but before seeing your question, I created a question here: math.stackexchange.com/q/434838/1778 Jul 2 '13 at 21:27
• David, 13 is a little more intricate than one would expect. The four seed solutions to $x^2 - 13 y^2 = -12$ are $$(1,1), (25,7), (155,43), (1691,469)$$ and for each the next $(x,y)$ pair is $(649x+2340y,180x + 649 y).$ Or the four seeds could be $(\pm 1, 1), (\pm 25,7)$ Jul 2 '13 at 23:45
• @WillJagy It looks a lot nicer if you work with the unit $\eta = (11+3 \sqrt{13})/2$, as I did above. Then $(1+\sqrt{13}) \eta = 25+7 \sqrt{13}$. But thank you for the reminder that I need to check both signs for the seed. Jul 2 '13 at 23:52
• @David, right, I saw your comment about ratio 31 at the other location. You are evidently much quicker at this than I am; I never learned any algebraic number theory, and, well, it is likely to remain that way at this point. Jul 2 '13 at 23:59