I've been looking at the pattern in the difference of squares recently. I've seen proofs that for a given prime, there is a unique pair of squares that differ by that prime.
What I'd like to know is: is there guaranteed to be more than one pair of squares with a difference of $m$ where $m$ is an odd, composite integer $> 0$?
The sequence of values $q^2 - p^2$ where $p = q - 1$ will produce a difference of squares of the form $( q - p )( q + p ) = ( 1 )( 2q - 1 ) = m$. There is always a solution for m using this approach, but it's not terribly interesting for factorization purposes. I'd like to find solutions where $p = q - k | k > 1$.
I can perform a search in $O(\sqrt{m})$ to find one/all such solutions - but I'm not sure that there is always a solution for $m$ (other than $k = 1$). Are there any existing proofs on this matter?
Write $m^2-n^2 = c$ as $(m+n)(m-n) = c$, for odd composite $c$. Since $c$ is composite, it can be written as a product of two natural numbers in at least two different ways: $c \times 1$ and $r \times s$, for odd $r > s$ (without loss of generality). So we can have
$$ m = \frac{c+1}{2}, \quad n = \frac{c-1}{2} $$
for the former case, and
$$ m = \frac{r+s}{2}, \quad n = \frac{r-s}{2} $$
for the latter case.