6. Find all positive integers n such that (3^{2n} + 3 n^2 + 7 ) is a perfect square.
Solution:
We use the fact that between square of two consecutive numbers there exist no perfect square. That is between (k^2 ) and ((k+1)^2 ) there is no square.
Note that (3^{2n} = (9^n)^2 ) and ((9^n + 1)^2 ) are two consecutive perfect square and (3^{2n} + 3 n^2 + 7 ) is always a number between them for n > 2 (easily proved by induction).

Hence the only solution is n = 2.