How can I find the integer solutions to:
$$ x^2=\frac{1}{2} n (n+1) $$
By brute force I have found the solutions (6,8) (35,49) and (204,288) but then it gets harder.
Note that the perfect squares are the sums of the odd natural numbers, whereas the expression on the right is the sum of all natural numbers, so the problem is to find the values where these two sequences intersect.
As mathlove commented, the answer in terms of a recursion is Sloane sequence 1109:
$$ x = f(n) = 6*f(n-1) - f(n-2) :: f(0)=0, f(1)=1. $$
Once $x$ is known, the triangular numbers which are perfect squares can be computed by the quadratic formula.