<s>[INST] find the number of perfect squares of the form : $n^6 + n^4+1$ find the number of perfect squares of the form -
$$n^6 + n^4+1$$
where n is a natural number.
I've reached this equation.
$$n^4(n^2+1)=(k+1)(k-1)$$
I thought this might have something to do with prime factorization but I don't seem to be getting anywhere.
Am I on the right track or should I approach this question differently?
 [/INST] We do not have a solution for $n=1$, so $n\geq 2$. Because $(k-1, k+1)\leq 2$ we should have $k+1\geq \frac{n^4}{2}$ and $k-1\leq 2(n^2+1)$. $n^4-2(2(n^2+1)+2)=n^4-4n^2-8=(n^2-2)^2-12>0$ for $n\geq3$. That means we only need to check $n=2: 64+16+1=81=9^2$ - unique solution
Also, there is an alternative way. Considering mod 4 you can show that $n$ should be even. After that consider $(n^3+\frac{n}{2})^2=n^6+n^4+\frac{n^2}{4}> n^6+n^4+1$ for $n>2$ and $(n^3+\frac{n}{2}-1)^2=n^6+n^4-2n^3+\frac{n^2}{4}-n+1=n^6+n^4+1-(n^3-\frac{n^2}{4}-n)<n^6+n^4+1$ for $n>2$
So again you only need to check 2 cases.
</s>