## The positive integers, $x$, $y$, and $z$, are consecutive terms of an arithmetic progression. Given that $n$ is a positive integer, the equation, $x^2 – y^2 – z^2 = n$, has exactly one solution when $n = 20$:

$$13^2 – 10^2 – 7^2 = 20.$$

In fact there are twenty-five values of $n$ below one hundred for which the equation has a unique solution.

How many values of $n$ less than fifty million have exactly one solution?

### To simplify the equation $x^2 – y^2 – z^2 = n$, you can use the fact that the integers $x$, $y$, and $z$ are in an arithmetic progression to rewrite $x = y + d$ and $z = y – d$, where “d” is the difference between consecutive terms.

So the equation could be rewritten as $(y + d)^2 – y^2 – (y – d)^2 = n$, which expands and simplifies to $4dy = n$.

This equation reveals that “n” is always divisible by four and is therefore only possible for even values of “d” assuming “n” is a positive integer. Writing “d” as “2k”, the equation becomes: $4y2k = n$, or indeed, $y2k = n/4$.

This implies that $n/4$ can be factored into two factors, one of which must be a multiple of “2” (since it’s multiplied by “y”, a positive integer). This means that the number of values of “n” that satisfy the condition is equal to the number of ways “n/4” can be factored into pairs, where at least one of the factors in the pair is even.

A key condition we have yet to use is the uniqueness of “y” and “k”, which requires only one factor pair. The number of factor pairs of a positive integer “m” can be defined as half the number of factors of “m” if “m” is a square number, and rounded up to next integer otherwise.

This shows that squares have an odd number of factors while non-squares have even numbers of factors. Thus, special notice needs to be play for square values of “n”.

So, in conclusion for “n” less than fifty million, you need to find the count of numbers in the form of “4m^2” and “4m” where “m^2” and “m” are less than 12500000 (≈ = sqrt(50 million / 4)).

There is one such number for “m” between 1 and sqrt(12500000), and there are two such numbers (“4m” and “4m^2”) for “m” between sqrt(12500000) and 12500000, so the total count is 2*12500000 + 1 – sqrt(12500000).

By crunching those numbers, you would get the result of approximately 24996060. After using the exact root and rounding accordingly, the exact solution would be obtained.

##### More Answers:

Repunit NonfactorsPrime Pair Connection

Same Differences