Find all positive integer $a,b$, such that $[a,b+2017]=[a+2017,b]$. Find all positive integer $a,b$, such that
$$[a,b+2017]=[a+2017,b]$$
where $[x,y]$ is the least common multiple of the numbers $x,y$.
My attempts :
1) If $a=b$ then pair $(a;a)$ is solution.
2) Let $a>b$ and $2017=p$.
$$[a,b+p]=[a+p,b]$$
$$\frac{a(b+p)}{\gcd(a,b+p)}=\frac{(a+p)b}{\gcd(a+p,b)}$$
If $a>b$ then $a(b+p)>(a+p)b$ and thus $\gcd(a,b+p)>\gcd(a+p,b)\ge1$
 A: Because of simmetry we can assume $a\geq b$.
Let $g=\gcd(a,b)$ so $a=gx$ and $b=gy$ for some relatively prime $x,y$. Let 
$$k=\frac{b+p}{\gcd(a,b+p)} \in \mathbb{N}$$ Then we have $$xk\gcd(b,a+p) = (gx+p)y\implies x\mid (gx+p)y \implies x\mid py$$
and so $x\mid 2017$ by Gauss lemma. The same is true for $y \mid 2017$. So since $2107$ is prime we have $x=y=1$ or $x=2017$, $y=1$

If $x=y$ then we are done.
If $x=p$ and $y=1$ we get $${2p\over \gcd(gp,2p)} = {g+1\over \gcd(p(g+1),g)}$$
Since $g$ and $g+1$ are relatively prime we have $\gcd(p(g+1),g) =\gcd(p,g)$ and since $\gcd(gp,2p) = p\gcd(g,2)$ we have 
$$\boxed{{2\over \gcd(g,2)} = {g+1\over \gcd(p,g)}}$$
Now $\gcd(p,g)\in\{1,p\}$ so we have 2 cases:


*

*case: $\gcd(p,g) =p$ then $p\mid g$ so $g=pm$ for some $m$. So we have $$2p = \gcd(g,2)(pm+1)$$
We see that $m$ must bee odd so $g$ is even so $\gcd(g,2) =2$ and now we have $p=pm+1$ which is impossible.

*case: $\gcd(p,g) =1$ so we have $$2 = \gcd(g,2)(g+1)$$ and so $g=1$. So $a=2017$ and $b=1$. (and of course $a=1$ and $b=2017$ also works.)
