calculate the intersection of two number series

266 Views Asked by At

I have a series of numbers. It is in the form of a parabola. This series is guaranteed to have at least one perfect square within it (edited I thought there was only one).

The second series is also a parabola describing all possible perfect squares

The function of the first series is $$16(n^2+64n−43)$$

The subset of results I am interested in are: $$352,1424,2528,3664,4832,6032,7264,8528,9824,11152,12512 ... 29584$$

The last number $29584$ is a perfect square of $172$.

The function of the second series (all perfect squares) is $${n^2+2n+1}$$

I presumed that if I graph the first series against the second series that they would cross at the perfect square as this number is common to both.

This is not the case. They do not appear to cross using the functions above.

What I am trying to do is to find the perfect square in the first series of numbers without iterating over the numbers, There are too many to make this efficient. The example I have provided is a very simple series, most series I will be dealing with use the same function $16(x^2+bx−c)$ but result in much larger coefficients.

Clearly I am approaching this all wrong! Is there a way to find the intersection of all perfect squares and the first series of numbers such that the one and only perfect square in the first series can be found without iterating over all numbers in that series?

2

There are 2 best solutions below

4
On BEST ANSWER

We give another approach that is also not computationally helpful when the numbers are very large, because it involves factorization.

Complete the square. We want $16((n+32)^2-1067)$ to be a perfect square $x^2$. Then $x=4y$ where $$y^2=(n+32)^2-1067.$$ So we want $$(n+32+y)(n+32-y)=1067.$$ Note that $1067=11\cdot 97$, so there are not many possibilities for $n+32+y$ and $n+32-y$.

Choose $n+32+y=97$, $n+32-y=11$. Then $y=43$, and therefore $x=172$.

Remark: We could have obtained an easier solution that does not involve factorization by choosing $n+32+y=1067$ and $n+32-y=1$. However, that is much larger than the smallest solution.

5
On

Because $16$ is a square, any time $16(n^2+64n-43)$ is a square, so is $n^2+64n-43$. Write $n^2+64n-43=k^2$. Complete the square in $n$, getting $(n+32)^2-1067=k^2, (n+32-k)(n+32+k)=1067=11\cdot 97$ We can have $k=43,n=22$ or $k=533,n=502$ if we insist that both $n,k$ are positive. The squares in your series are $16k^2$, so $172^2$ and $2132^2$