# 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

$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.