MathLabs

Problem 3

Find all positive integers nn that can be written as n=a2+b2n=a^2+b^2, where a,ba,b are relatively prime positive integers and every prime p<=sqrt(n)p <= sqrt(n) divides abab.
Step 4 of 4: Check the remaining cases
(a,b)=(1,1),(2,1),(3,2);n=2,5,13(a,b)=(1,1),(2,1),(3,2); n=2,5,13
Detailed analysis

If a>ba>b, then a=b+1a=b+1 and b=1b=1 or 22, giving (a,b)=(2,1)(a,b)=(2,1) or (3,2)(3,2) and hence n=5n=5 or 1313. Their required primes are respectively 22, and 2,32,3, all of which divide abab. Together with (1,1)(1,1), the complete answer is n=2,5,13n=2,5,13.