Find all $q \in \mathbb{N}$ such that $\frac{q(q+1)}{12}$ is a Perfect square.
Trivially we see that $q=3$ is the first candidate. Now let $$\frac{q(q+1)}{12}=r^2$$ $\implies$ $$q^2+q-12r^2=0$$ By Quadratic formula we get $$q=\frac{-1\pm\sqrt{48r^2+1}}{2}$$ Any help here?
It remains to find $r$ such that $48r^2+1=s^2$ or $s^2-48r^2=1$, which is Pell's equation with fundamental solution $s=7,r=1,q=3$ as you found. All other solutions are generated by the following recurrence: $$\begin{bmatrix}s_{k+1}\\r_{k+1}\end{bmatrix}=\begin{bmatrix}7&48\\1&7\end{bmatrix}\begin{bmatrix}s_k\\r_k\end{bmatrix}$$ This may be solved for $s=\sqrt{48r^2+1}$, giving $$s=\frac{(7+4\sqrt3)^k+(7-4\sqrt3)^k}2,k\in\mathbb N$$ Since we want only positive $q$, we take the positive sign in the formula for $q$, yielding $q=\frac{s-1}2$.