Number theory problem - show $N$ is a square when... I read about this problem back in secondary school and never came close to producing a proof.  It has bugged me ever since.  I suspect I'm not familiar enough with number theory tricks and so forth to solve it (as well as not being clever enough).
The question is, prove that when N is a whole number it is also a perfect square, where 
$$N = 2 + 2\sqrt{12n^2 + 1}$$
so, for example, $N = 16$ when $n = 2$.
Cheers
P.S. this is the first time I have used this site so apologies in advance for defying standard conventions.
 A: Hint: Pell's equation, since $ 12n^2 + 1 = m^2 $ allows you to classify the values.
Sorry but I don't know any other approach, if you are not familiar with this number theory trick.

Observe that in order of $N$ to be an integer, $12n^2 + 1$ must be the square of a rational number. Since it is an integer, hence it must be a perfect square. Thus we have the Pell's equation of the form $m^2 - 12n^2 = 1 $.
We can check that $7^2- 12 \times 2^2=1$ is an initial solution. From the theory of Pell's equation, we know that the solutions have the form $$m_i + \sqrt{12} n_i = (7 + 2\sqrt{12})^i = ( 2 + \sqrt{3})^{2i}.$$
Hence, 
$$2 + 2 m_i = 2 +  (2+\sqrt{3})^{2i} + (2-\sqrt{3})^{2i}  = [(2 +\sqrt{3})^i + (2-\sqrt{3})^i]^2.   $$
It is now obvious that the expression in the brackets is an integer, hence $2+2m_i$ is a perfect square.

To motivate Yoni's observation that "The largest prime factor of $n$ and $N$ are the same", observe that
$$n_i = \frac{ (2+\sqrt{3})^{2i} - (2-\sqrt{3})^{2i} } {\sqrt{12} } = N_i \frac{ (2+\sqrt{3})^{i} - (2-\sqrt{3})^{i}}{\sqrt{12} }$$
The second term on the right is an integer that is much smaller than $N_i$.
A: If 12n^2+1 is a square, m^2, then m^2-12n^2=1. This is Pell's equation; looking at the continued fraction expansion of $\sqrt{12}$ shows that 7^2-12*2^2 is the smallest solution. So all values of m, n are given by $m+n\sqrt{12} = (7+2\sqrt{12})^k$ for some positive integer k.
