Show that if n2 + m and n2 - m are perfect squares then m is divisible by 24.
This problem comes from Larson's Problem-solving Through Problems in the section on modular arithmetic. It is the third part of a four-part problem, with the previous two parts of the problem being to prove that if x3 + y3 = z3 has a solution in integers x, y, and z then one of them is divisible by seven, and the second part to prove that if 2n + n2 is prime then n is congruent to 3 mod6. Since they're part of the same problem I assume that they are somehow relevant.
The Attempt at a Solution
I want to show that m is divisible by both 3 and 8. By the Chinese Remainder Theorem, I can set up the following:
m ≡ a(mod3)
m ≡ b(mod8)
And I assume that what I want to do is show that the two expressions can only be perfect squares if a = b = 0.
I don't know if any of the following actually brings me any closer to a solution, but I feel like they might be pointing in the right direction:
I can set up the following relations:
n2 + m ≡ n2(mod3) + a(mod3)
n2 + m ≡ n2(mod8) + b(mod8)
n2 - m ≡ n2(mod3) - a(mod3)
n2 - m ≡ n2(mod8) - b(mod8)
And further I can mod n out so that
n2(mod3) + a(mod3) ≡ [a(mod3)](modn), etc
I can also multiply n2 + m and n2 - m to get n4 - m 2, which gets
n4 - m 2 ≡ (-a2mod3)(modn)
n4 - m 2 ≡ (-b2mod8)(modn)
All of which I think might be useful in establishing a = b = 0, but I can't think of how to get there.