Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$k$ is a positive integer. Could we find all the pairs of positive integers $(a,b)$ such that the Diophantine equation $$x(x+a)=y(y+b)$$ has at least $k$ positive integer solutions $(x,y)$, that is $x,y$ are all positive integers?

For example, $a=2(k+1)+\dfrac{(2k+2)!!}{2k+2},b=\dfrac{(2k+2)!!}{2k+2}-2(k+1)$. I find it luckily , without System approach

This problem's background is the 2014 China Mathematical Olympaid P2 problem. The exam is only want a pair $(a,b)$. So, I want to find all pairs $(a,b)$.

share|cite|improve this question
Do you know how to find the number of solutions for some given $a, b$? – Karolis Juodelė Dec 26 '13 at 22:03
Since there are infinitely many such pairs, what do you mean by "find"? – Robert Israel Dec 26 '13 at 23:12
@RobertIsrael analytic expression give all such $a,b$ ? – ziang chen Dec 27 '13 at 0:03
Could you give us some background or context for this question, such as what you have tried, where you have got stuck, and where this question comes from? – Old John Dec 30 '13 at 23:25
@OldJohn Thanks a lot! I have edit the problem – ziang chen Dec 30 '13 at 23:29

$x(x+a) = (x+\frac a2)^2-\frac{a^2}4$, so $x(x+a)=y(y+b)$ if and only if $$\left(x+\frac a2\right)^2-\left(y+\frac b2\right)^2=\frac{a^2-b^2}{4}$$ if and only if $$(2x+2y+a+b)(2x-2y+a-b)=(a+b)(a-b). $$ So if we let $c=a+b, d=a-b$, then any factorization of $cd$ into factors $c'd'$ of the same parity (i.e. $c'\equiv c\pmod 2$, $d'\equiv d\pmod 2$) gives rise to the solution $x=\frac{c'-c+d'-d}{2}$, $y=\frac{c'-c+d-d'}{2}$. And if $c'>c$ and $c'-c>|d'-d|$ these solutions are positive, and if $c>|d|\ge0$ then also $a,b>0$.

For $k>0$ let $c=3^{k+1}$, $d=3^{k}$. Then for $0< i\le k$ we can let $c'=3^{k+1+i}$, $d'=3^{k-i}$, that is with $$ a=\frac{3^{k+1}+3^{k}}2=2\cdot 3^{k}, \qquad b=\frac{3^{k+1}-3^{k}}2=3^{k}$$ we have at least the $k$ solutions $$ x=\frac{3^{k+1+i}-3^{k+1}-3^{k-i}+3^k}{2}, \qquad y=\frac{3^{k+1+i}-3^{k+1}+3^{k-i}-3^k}{2}$$

share|cite|improve this answer
Of course $3$ can be replaced by any odd integer $\ge 3$. Another special case is $a=b$, where you have infinitely many positive integer solutions $x=y$. – Robert Israel Dec 26 '13 at 23:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.