# Does $x^2 - y^2 = 12345678$ (x,y are integers) have any solutions? [duplicate]

This question appeared in KVPY online exam held on Nov 5. This equation is the equation of a hyperbola so any solution must be of the form $a\sec(k),a\tan(k)$. So no solutions.

We have $x^2-y^2=(x-y)(x+y)$ and $12345678=2\cdot3^2\cdot 47\cdot 14593$, so that $$(x-y)(x+y)=2\cdot3^2\cdot 47\cdot 14593,$$ and for any choice of factors, adding $(x-y)$ and $(x+y)$ is odd, so that $2x=(x-y)+(x+y)$ is odd. So no solutions.
Since right side is even $x$ and $y$ must be the same parity. So left side is divisible by 4 and right is not. So no solution.
A perfect square is congruent $0$ or $1$ modulo $4$, hence $k+y^2$, where $k\equiv 2\mod 4$ is congruent $2$ or $3$ modulo $4$, hence cannot be a perfect square. Since the given number has the form $4m+2$, there is no solution.