checking whether certain numbers have an integral square root

I was wondering if it is possible to find out all $n \geq 1$, such that $3n^2+2n$ has an integral square root, that is, there exists $a \in \mathbb{N}$ such that $3n^2+2n = a^2$

Also, similarly for $(n+1)(3n+1)$.

Thanks for any help!

-
Hint: Notice that your equation is the same as $n(3n+2) = a^2$. Now split into cases, either n is even or odd. In the odd case $n$ and $3n+2$ are coprime (check this), so that the only way for the product to be square is if both terms are squares themselves. From here play around with the resulting equations to turn into a Pell style equation. For the even case this is similar, just need to do some cancellation of $2$'s. – fretty Jul 22 '12 at 11:06

1 Answer

$3n^2+2n=a^2$, $9n^2+6n=3a^2$, $9n^2+6n+1=3a^2+1$, $(3n+1)^2=3a^2+1$, $u^2=3a^2+1$ (where $u=3n+1$), $u^2-3a^2=1$, and that's an instance of Pell's equation, and you'll find tons of information on solving those in intro Number Theory textbooks, and on the web, probably even here on m.se.

Try similar manipulations for your other question.

-
Lots of students learn the technique of completing the square, but if you tell a class there is a standard technique in algebra for reducing a problem involving a quadratic polynomial with a first-degree term to a problem involving a quadratic polynomial with no first-degree term, and ask what it's called, they often take a while to figure out what you're talking about. – Michael Hardy Jul 23 '12 at 3:11