Determine if equation will generate perfect squares

• $4n^2 + 128n - 131$
• $4n^2 + 16n - 11$
• $4n^2 + 24n - 3$

Is it possible to determine how many values of n will generate a perfect square? Or better yet, is it possible to determine which values of n will generate a perfect square?

-
Do you need it specifically just for those 3 equations? Or will you need a general method for any of the form? – Ragib Zaman Oct 1 '11 at 3:18
Here you can complete the square, set the quadratic equal to an unknown $m^2$, rearrange and factor, $$(2n+a+m)(2n+a-m)=b,$$ then look at the prime factorization of $b$ and check when $k=(d+b/d-2a)/4$ is an integer for not-necessarily-positive divisors $d|b$, in which case $n=k-a$ and $m=\pm(2k+a)$. – anon Oct 1 '11 at 3:42
@RagibZaman I needed a general method for any equation of the form 4n^2 + 4kn - p. – user16961 Oct 1 '11 at 5:07
@anon Could you provide an example using one of the equations I gave? – user16961 Oct 1 '11 at 5:11
For $4n^2+4kn-p$, it is, as the answers make clear, straightforward. Complete the square to get $(2n+k)^2-k^2-p=y^2$, and rewrite as $(2n+k-y)(2n+k+y)=k^2+p$. Then we get all solutions by factoring $k^2+p$. But note for example that if we change the $4n^2$ to $3n^2$, things get very much harder. – André Nicolas Oct 1 '11 at 6:06

You can complete the square. For the third example, $4n^2+24n-3=(2n+6)^2-39.$ As $(n+1)^2-n^2=2n+1$, this cannot be a perfect square for any $2n+6$ greater than $20$, leaving only $7$ possibilities.

We can do better. You want $(2n+6)^2-39=p^2.$ This means $39=(2n+6-p)(2n+6+p)$. There will be one solution for each way to factor $39$ into two numbers. Because of the $2n,$ you need the sum of the numbers to be even, which will be true for odd numbers like $39$ and will be the case for your other three examples.

-

HINT: Let's rearrange the first equation:

$4n^2-4n+132n+1-132=(2n-1)^2+132(n-1)=m^2$ now we can easily see that $n-1$ has to be $0$ so $n=1$

For the second equation we may write:

$4n^2+4n+12n+1-12=(2n+1)^2+12(n-1)=m^2 \Rightarrow n=1$

For the third equation:

$4n^2+20n+4n+25-28=(2n+5)^2+4(n-7)=m^2 \Rightarrow n=7$

-
For the first, n=81 works as well. For the third, n=1 works. – Ross Millikan Oct 1 '11 at 4:27
@Ross,I didn't say that these solutions are unique – pedja Oct 1 '11 at 4:30
That is implied by the fact that "now we can easily see that $n-1$ has to be $0$" – Ross Millikan Oct 1 '11 at 4:33
and how is that a hint? – t.b. Oct 1 '11 at 11:22