## Prime Square Differences

#### Problem

Prove that all primes greater than 2 can be written as the difference of two squares.

#### Solution

By considering the difference of two consecutive square numbers,

(`n` + 1)^{2} `n`^{2} = (`n`^{2} + 2`n` + 1) `n`^{2} = 2`n` + 1

Hence all odd numbers greater than 1, which must include all primes greater than 2, can be written as the difference of two square numbers.

For example, 83 = 241 + 1 = 42^{2} 41^{2}

Investigate primes that can be written as the difference of square numbers in general, including non-consecutive squares.

Problem ID: 94 (Dec 2002) Difficulty: 2 Star