Find the sum of all values of $a$ satisfying that there exist positive integers $a,b$ satisfying $(a-b) \sqrt{ab}=2016$

Solution 1:

A start of a solution.

The prime factorization of $2016$ is $2^5\cdot3^2\cdot7$.

In order for $\sqrt{ab}$ to be a integer, both $a$ and $b$ must be multiples of squares and the same factors, i.e. $a=zx^2,b=zy^2, x>y$. Thus: $$(a-b)\sqrt{ab}=z^2(x^2-y^2)xy = 2016$$

Use the fact that if neither of two numbers is divisible by 3, the difference of their squares must be. Thus, $z$ can not be a multiple of $3$, and since it cannot be a multiple of $7$, it must be one of $1,2,4$. So now we must solve: $$(x^2-y^2)xy = 2016 = 2^5\cdot 3^2\cdot7$$ $$(x^2-y^2)xy = 504 = 2^3\cdot 3^2\cdot7$$ $$(x^2-y^2)xy = 126 = 2^1\cdot 3^2\cdot7$$

Solution 2:

$$\text{Find} \;\sum_{(a,b) \in S}a \qquad \text{where} \qquad S=\{(a,b)\in \mathbb Z^+ : (a-b)\sqrt{ab}=2016\}$$

Let $(a,b) \in S$ and let $x = \sqrt{ab}$. Then $(a-b) = \dfrac{2016}{x}$.

So

$$\left\{ \begin{array}{c} a = \sqrt{ab + \frac 14(a-b)^2} + \frac 12(a-b) \\ b = \sqrt{ab + \frac 14(a-b)^2} - \frac 12(a-b) \\ \end{array} \right\} \implies \left\{ \begin{array}{c} a = \sqrt{x^2 + \dfrac{1008^2}{x^2}} + \dfrac{1008}{x} \\ b = \sqrt{x^2 + \dfrac{1008^2}{x^2}} - \dfrac{1008}{x} \\ \end{array} \right\}$$

We need to solve $x^2 + y^2 = z^2$ where $xy = 1008$.

For now, because of symmetry, we can assume $x < y$. Then the possibilities for $x$ are $$x \in \{1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 16, 18, 21, 24, 28\}$$

Working mod 11.

The quadratic residues modulo $11$ are

\begin{array}{|c|cccccc|} \hline x & 0 & 1,10 & 2,9 & 3,8 & 4,7 & 5,6 \\ x^2 & 0 & 1 & 4 & 9 & 5 & 3 \\ \hline \end{array}

Since $xy = 1008 = 7 = 18 = 29 = 40 = 51 = 62 = 73 = 84 = 95 \pmod{11}$, the possibilities for $x,y$ (accounting for $x, y$ symmetry) are

\begin{array}{|c|ccccc|} \hline x & 1 & 2 & 3 & 4 & 5 \\ y & 7 & 9 & 6 & 10 & 8 \\ x^2 + y^2 & 6 & 8 & 1 & 6 & 1 \\ \hline \end{array}

We find $x \pmod{11} \in \{3,5,6,8\}$. This whittles the list down to $$x \in \{3, 6, 8, 14, 16, 28\}$$

Working mod 13.

The quadratic residues modulo $13$ are

\begin{array}{|c|cccccc|} \hline x & 0 & 1,12 & 2,11 & 3,10 & 4,9 & 5,8 & 6,7 \\ x^2 & 0 & 1 & 4 & 9 & 3 & 12 & 10 \\ \hline \end{array}

Since $xy = 1008 = 7 = 20 = 33 = 46 = 59 = 72 = 85 = 98 \pmod{13}$, the possibilities for $x,y$ (accounting for $x, y$ symmetry) are

\begin{array}{|c|ccccc|} \hline x & 1 & 2 & 3 & 4 & 6 & 8\\ y & 7 & 10 & 11 & 5 & 12 & 9\\ x^2+y^2 & 11 & 0 & 0 & 2 & 11 & 2 \\ \hline \end{array}

We find $x \pmod{13} \in \{ 2, 3, 10, 11 \}$ This whittles the list down to $$x \in \{3, 16, 28\}$$

We compute $x, y,$ and $z$.

\begin{array}{ccc} x & y=\dfrac{1008}{x} & z=\sqrt{x^2+y^2} \\ \hline 3 & 336 & 336.0133926 \\ \color{red}{16} & \color{red}{63} & \color{red}{65} \\ 28 & 36 & 45.607017 \\ \hline \end{array}

Hence

\begin{array}{ccc|cc|c} x & y=\frac{1008}{x} & z=\sqrt{x^2+\left(\frac{1008}{x}\right)^2} & a=z+y & b=z-y & (a-b)\sqrt{ab} \\ \hline 16 & 63 & 65 & 128 & 2 & 2016 \\ 63 & 16 & 65 & 81 & 49 & 2016 \\ \hline \end{array}

So $\sum_{(a,b)\in S}a = 128 + 81 = 209$

Solution 3:

$$(a-b)\sqrt{ab}=2016\tag1$$

Since $a-b$ is a positive integer, $\sqrt{ab}$ is a positive rational number. Let $\sqrt{ab}=\dfrac mn$ where $m,n$ are positive integers such that $\gcd(m,n)=1$, from which we have $ab=\dfrac{m^2}{n^2}$. The LHS is an integer, so is the RHS, from which we have to have $n=1$.

Since both $a-b$ and $\sqrt{ab}$ are positive integers, we can set $a-b=s,ab=t^2$ where $s,t$ are positive integers such that $st=2016$.

Since $a=s+b,t=\dfrac{2016}{s}$, we have $$ab=t^2\implies (s+b)b=\left(\dfrac{2016}{s}\right)^2\implies b=\dfrac{-s^2+\sqrt{D}}{2s}$$ where $D=s^4+ 2^{12}\cdot 3^4\cdot 7^2$.

Since $2016=2^5\times 3^2\times 7^1$, let $s=2^i\cdot 3^j\cdot 7^k$ where $i,j,k$ are non-negative integers such that $0\le i\le 5,0\le j\le 2$ and $0\le k\le 1$.

Since $s$ is a positive divisor of $2016$, there are $(5+1)(2+1)(1+1)=36$ cases to consider, but we don't need to check if $\sqrt D$ is an integer for $36$ distinct $s$ respectively.

Now, $$\small\begin{align}\sqrt D&=\sqrt{s^4+ 2^{12}\cdot 3^4\cdot 7^2}\\\\&=\sqrt{2^{4i}\cdot 3^{4j}\cdot 7^{4k}+2^{12}\cdot 3^4\cdot 7^2}\\\\&=\sqrt{2^{\min(4i,12)} 3^{\min(4j,4)} 7^{\min(4k,2)}(2^{4i-\min(4i,12)} 3^{4j-\min(4j,4)} 7^{4k-\min(4k,2)}+2^{12-\min(4i,12)} 3^{4-\min(4j,4)} 7^{2-\min(4k,2)})}\\\\&=2^{\min(2i,6)} 3^{\min(2j,2)} 7^{\min(2k,1)}\sqrt{2^{4i-\min(4i,12)} 3^{4j-\min(4j,4)} 7^{4k-\min(4k,2)}+2^{12-\min(4i,12)} 3^{4-\min(4j,4)} 7^{2-\min(4k,2)}}\end{align}$$ Note here that $$(4i-\min(4i,12))(12-\min(4i,12))=0$$ $$(4j-\min(4j,4))(4-\min(4j,4))=0$$ $$(4k-\min(4k,2))(2-\min(4k,2))=0$$ from which we see that $\sqrt D$ is of the form either $$u\sqrt{1+v^2},\quad u\sqrt{3^4+(7v)^2},\quad u\sqrt{7^2+(2^{2w}\cdot 3^z)^2},\quad u\sqrt{2^{4v}+3^w\cdot 7^z}$$ where $u,v$ are positive integers, and $w,z$ are non-negative integers.

We can easily see that the first three forms cannot be an integer.

  • $\sqrt D=u\sqrt{1+v^2}$ is not an integer since $1+y^2=x^2\iff (x-y)(x+y)=1$ has no positive integer solutions.

  • $\sqrt D=u\sqrt{3^4+(7v)^2}$ is not an integer since the positive integer solutions for $3^4+y^2=x^2\iff (x-y)(x+y)=3^4$ are $(x-y,x+y)=(1,3^4),(3,3^3)$, i.e. $(x,y)=(41,40),(15,12)$, from which there are no $v$ such that $7v=40,12$.

  • $\sqrt D=u\sqrt{7^2+(2^{2w}\cdot 3^z)^2}$ is not an integer since the positive integer solution for $7^2+y^2=x^2\iff (x-y)(x+y)=7^2$ is $(x-y,x+y)=(1,7^2)$, i.e. $(x,y)=(25,24)$, from which there is no $(w,z)$ such that $2^{2w}\cdot 3^z=24$.

  • For the form $\sqrt D=u\sqrt{2^4+3^w\cdot 7^z}$, we have $(i,j,k)=(4,0,0),(2,2,1)$. In either case, $\sqrt D$ is of the form $u\sqrt{2^4+3^4\cdot 7^2}=u\sqrt{3985}=u\sqrt{5\times 797}$ which is not an integer where $797$ is a prime.

  • For the form $\sqrt D=u\sqrt{2^8+3^w\cdot 7^z}$, we have $(i,j,k)=(5,0,0),(1,2,1)$. In either case, $\sqrt{D}$ is of the form $u\sqrt{2^8+3^4\cdot 7^2}=65u$ which is an integer, which gives $(a,b)=(81,49),(128,2)$ respectively.

  • For the form $\sqrt D=u\sqrt{2^{12}+3^w\cdot 7^z}$, we have $(i,j,k)=(0,2,1)$. In this case, $\sqrt D$ is of the form $u\sqrt{2^{12}+3^4\cdot 7^2}=u\sqrt{8065}=u\sqrt{5\times 1613}$ which is not an integer where $1613$ is a prime.

Since the solutions for $(1)$ are $(a,b)=(81,49),(128,2)$, the answer is $$81+128=\color{red}{209}$$