This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Clearly n = 1 , 2 are solutions. Suppose n > 2 . Since ϕ ( n ) is even, n 2 + 3 must be even, so n is odd. Then n 2 + 3 ≡ 4 ( m o d 8 ) , so there are at most 2 factors of 2 in ϕ ( n ) . This implies that there are at most two primes dividing n . Now if n is a prime power p k , we get p k − 1 ( p − 1 ) ∣ ( p 2 k + 3 ) . If k > 1 then we get p k − 1 ∣ 3 , so p = 3 and k = 2 . If k = 1 we get ( p − 1 ) ∣ ( p 2 + 3 ) , but ( p − 1 ) ∣ ( p 2 − 1 ) as well, so ( p − 1 ) ∣ 4 , so p = 2 , 3 , 5 . So the only prime power solutions are n = 2 , 3 , 5 , 9 .
It remains to look at n = p a q b where p , q are distinct primes and a , b are positive integers. By the previous remark about factors of 2 , it must be the case that both p and q are 3 ( m o d 4 ) . If one of the exponents, say a , is ≥ 2 , then ϕ ( n ) is divisible by p a − 1 , and so p a − 1 ∣ ( n 2 + 3 ) , so p a − 1 ∣ 3 , so p = 3 and a = 2 . So we've narrowed it down to two cases: (1) n = 9 q and (2) n = p q with p , q distinct primes congruent to 3 ( m o d 4 ) .
In case (1), we get 6 ( q − 1 ) ∣ ( 8 1 q 2 + 3 ) , so 2 ( q − 1 ) ∣ ( 2 7 q 2 + 1 ) , but 2 ( q − 1 ) ∣ ( 2 7 q 2 − 2 7 ) as well, so 2 ( q − 1 ) ∣ 2 8 , which gives q = 2 , 3 , 8 , 1 5 , but q = 3 is supposed to be an odd prime congruent to 3 ( m o d 4 ) , so there are no solutions in this case.
In case (2), we get ( p − 1 ) ( q − 1 ) ∣ ( p 2 q 2 + 3 ) . Since ( p − 1 ) ( q − 1 ) ∣ ( p 2 q 2 − p 2 − q 2 + 1 ) , we can subtract to get ( p − 1 ) ( q − 1 ) ∣ ( p 2 + q 2 + 2 ) . Letting A = 2 p − 1 , B = 2 q − 1 and simplifying gives A B ∣ ( A 2 + A + B 2 + B + 1 ) which is equivalent to A B ∣ ( B 2 + B + 1 ) ∣ ( A 2 + A + 1 )
This is a version of a well-known Vieta descent problem. The key observation is that if ( A , B ) is a solution, then so is ( B A 2 + A + 1 , A ) , and it's not hard to check that if 1 < A < B , then B A 2 + A + 1 < A (note that A = B and A + 1 = B are impossible). So we can keep reducing the solution to get one with A = 1 , which implies B = 1 or 3 . (In fact ( 1 , 3 ) reduces to ( 1 , 1 ) in this way.)
So we can generate all solutions by starting at ( 1 , 1 ) and reversing the process: ( 1 , 1 ) → ( 1 , 3 ) → ( 3 , 1 3 ) → ( 1 3 , 6 1 ) → ( 6 1 , 2 9 1 ) ⋯ which leads to the candidate solutions ( 3 , 3 ) → ( 3 , 7 ) → ( 7 , 2 7 ) → ( 2 7 , 1 2 3 ) → ( 1 2 3 , 5 8 3 ) ⋯ and now the thing to check is that at least one of the entries in each ordered pair is divisible by 3 , so that ( 3 , 7 ) is the largest ordered pair consisting of primes.
Well, the sequence 1 , 3 , 1 3 , 6 1 , 2 9 1 , … is in OEIS, so I'll just punt to that. It satisfies the recurrence a n = 6 a n − 1 − 6 a n − 2 + a n − 3 (provable by an easy induction), so a n ≡ a n − 3 ( m o d 3 ) , so mod 3 that sequence is just 1 , 0 , 1 , 1 , 0 , 1 , 1 , 0 , 1 , … , so the sequence of solutions 3 , 7 , 2 7 , 1 2 3 , 5 8 3 , … is just 0 , 1 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , … mod 3, so at least one of any two consecutive terms is divisible by 3 , which proves that ( 3 , 7 ) is the largest ordered pair consisting of primes.
So the full set of solutions to ϕ ( n ) ∣ ( n 2 + 3 ) is n = 1 , 2 , 3 , 5 , 9 , 2 1 , and the answer is 2 1 .