The prime p has the property that n^{2} - n + p is prime for all positive integers less than p. Show that there is exactly one integer triple (a, b, c) such that b^{2} - 4ac = 1 - 4p, 0 < a ≤ c, -a ≤ b < a.

**Solution**

Answer: (1, -1, p) is the only solution.

b^{2} = 4ac + 1 - 4p, so b^{2} is odd and hence b is odd (but not necessarily positive). Put b = 2n - 1. Then 4n^{2} - 4n + 1 = 4ac + 1 - 4p, so n^{2} - n + p = ac. That is promising, because if n was in the required range we could conclude that a or c = 1 and, since 0 < a ≤ c, that a = 1.

We are given that n^{2} - n + p is prime for n = 1, 2, ... , p-1. But it is obviously also prime for n = 0 and for n = -1, -2, ... , -(p-2) since (-m)^{2} - (-m) = m^{2} + m = (m+1)^{2} - (m+1) (so truth for m+1 implies truth for -m). So the required range is -(p-2) ≤ n ≤ (p-1) or (-2p+3) ≤ b ≤ (2p - 3).

ac ≥ a^{2} ≥ b^{2}, so b^{2} - 4ac ≤ -3b^{2}. If |b| ≥ p, then -3b^{2} ≤ -3p^{2} < 1 - 4p (since (3p-1)(p-1) > 0). But we know that b^{2} - 4ac = 1 - 4p, so certainly |b| < p. But we know b is odd, so |b| <= p - 2. That is sufficient to guarantee that b is in the required range since (p - 2) < (2p - 3).

So we can conclude that a = 1. But now b is odd and satisfies -1 ≤ b < 1, so b must be -1. Finally b^{2} - 4ac = 1 - 4p gives c = p.

© John Scholes

jscholes@kalva.demon.co.uk

22 Aug 2001