3

If I have a pair of integers, $X$ and $Y$, I would like to find an integer $\lambda$ such that $$ X - \lambda Y = t^2 $$ where $t$ is any other integer. All these integers can be either positive or negative.

Just wondering whether there is an simple formula or algorithm for finding either one or all the solutions.

wang1908
  • 91
  • 4

1 Answers1

3

All perfect squares are congruent to either $0$ or $1$ modulo $4$.

So $3-4\lambda$ is not a perfect square for any integer $\lambda$.

Casteels
  • 11,292
  • 4
  • 27
  • 38
  • 1
    How about the case where this condition is met. – wang1908 Mar 08 '18 at 22:53
  • This doesn't answer the question. At most it only gives a criterion to know some of the cases, in which the algorithm (whose existence is being asked) should return no solutions. – crivair Mar 08 '18 at 22:55
  • fair enough, I read it initially as asking if such a $\lambda$ always exists. – Casteels Mar 08 '18 at 22:58