Number Theory involving Pythagorean triplets With $n \neq 4$ find all natural numbers $(n,k)$ such that $n^2 + (n-1)^2 = k^2$
This is part of a problem I am working on. I am trying to find out whether $n=4$ is the only answer or there exist many more answers.
I tried using the theorem for primitive Pythagorean triplets setting $n=u^2-v^2$ and $n-1=2uv$ where $(u,v)=1$. However I couldn't get anywhere after this
Please help on how to go forward I'm stuck!
Edit- Further, is there a way of generating values on $n$ ?
 A: You can rewrite
$$n^2+(n−1)^2=k^2$$
to get the negative Pell equation:
$$m^2 - 2k^2 = -1$$
where $m=2n-1$.
If I'm not mistaken, the solutions for $m$ are $1$, $7$, $41$, $239$, $1393$, $8119$, $47321$, $275807$, $1607521$, $9369319$, ...
This is given by the formula:
$$m_i = \frac{1+\sqrt{2}}{2} (3+2\sqrt{2})^i + \frac{-1+\sqrt{2}}{2} (3-2\sqrt{2})^i$$
That second term is very small, so you can just use the first term and round it up to an integer.
$$m_i = \lceil\frac{1+\sqrt{2}}{2} (3+2\sqrt{2})^i\rceil$$
A: You have $u^2-v^2=1+2uv$ and $(u-v)^2-2v^2=1$. This is a Pell equation. You can use this to generate all possible values of $n$.
A: As I recall, this formula generates all such triples:  For the triple $(a,b,c)=(4,3,5)$, we have that $m=2, n=1$, so that $a=4=2mn$ and $b=3 =m^2-n^2.$   Define the sequences recursively $m_1 = 2$, $n_1 = 1$ and then $m_{j+1} = 2m_j+n_j$ and $n_{j+1}=m_j.$   
Then $m_2 = 5, n_2 =2,$ giving the triple $(20,21,29)$
Then $m_3 = 12, n_3 =5$, giving the triple $(119,120,169)$
Etc.
