Find all the values: a+b=c+d=ab-cd=4n for n>1 This question was given to my cousin who is in grade 9 in Kazakhstan, hence the solution should not involve any matrices, sets etc. and I cannot think of a simpler solution. Any help would be greatly appreciated!
Find all the values: a+b=c+d=ab-cd=4n for n>1
 A: Not sure I'd have found this solution in ninth grade, but it is elementary, at least.
First, let's solve:
$$\tag{1}a+b=c+d\\
ab-cd=4n$$
If (1) are true, then $$\begin{align}
(a-1)(b-1)-(c-1)(d-1)&=ab-(a+b)+1-(cd-(c+d)+1) \\
&= ab-cd +((c+d)-(a+b))\\
& = ab-cd
\end{align}$$
So if $(a,b,c,d)$ is a solution to $(1)$, then so is $(a-1,b-1,c-1,d-1)$. Similarly, true that $(a+1,b+1,c+1,d+1)$ must be a solution. By induction $(a+k,b+k,c+k,d+k)$ is a solution, for any integer $k$.
So, we can assume $c=0$ to solve (1), and get the general solution by adding a constant back in.
If $c=0$, then $a_0+b_0=d_0$ and $a_0b_0=4n$. So any factorization of $4n$ yields a family of solutions to (1) $(a,b,c,d)=(a_0+k,b_0+k,k,a_0+b_0+k)$ for arbitrary $k$. And the families for all $a_0,b_0$ factorizing $4n$ yield all solutions to $(1)$.
Now, add back in the condition $a+b=4n$ and we get that $a_0b_0=4n$ and $a_0+b_0=4n-2k$. So we need $a_0b_0=4n$ and both factors to be even. That is, we need $a_0=2a_1, b_0=2b_1$, and $a_1b_1=n$. Then the $k=\frac{4n-a_0-b_0}{2}=2n-a_1-b_1$ giving us a solution:
$$(2n+a_1-b_1,2n+b_1-a_1, 2n-a_1-b_1, 2n+a_1+b_1)$$
For example, if $a_1=1,b_1=n$ then :
$$(a,b,c,d)=(n+1,3n-1,n-1,3n+1)$$
For $n=6, a_1=2,b_1=3$ you get:
$$(11,13,7,17)$$
and indeed, $11\cdot 13 - 7\cdot 17 =11+13=7+17= 24$.
A: The solution is basically the same as the one by Thomas.
WLOG, we can assume $a \le b$ and $c \le d$. So $a,c \le 2n$.
From the equations, we have $b = 4n - a, d = 4n - c$, and
$$
4n = a (4n-a) - c (4n-c) = (4n - a - c) (a - c).
$$
But $a+c$ and $a-c$ share the same parity, so they have to be both even:
$$
\begin{aligned}
a + c &= 2 p, \\
a - c &= 2 q,
\end{aligned}
$$
or
$$
\begin{aligned}
a &= p + q, \\
c &= p - q,
\end{aligned}
$$
and
$$
n = (2n - p) \, q.
$$
This means $q|n$, and $2n-p|n$. Since $p + |q| \le \max\{a, c\} \le 2n$, $2n-p\ge |q|$.  This means $q$ is positive, and $n \ge |q| q = q^2$.  So the general solution is
$$
\begin{aligned}
a = 2n - \left(\frac{n}{q} - q \right), \\
b = 2n + \left(\frac{n}{q} - q \right), \\
c = 2n - \left(\frac{n}{q} + q \right), \\
d = 2n + \left(\frac{n}{q} + q \right).
\end{aligned}
$$
with $1 \le q \le \sqrt{n}$.  The positions of $a$ and $b$ can be exchanged, so are those of $c$ and $d$.

For example, $n = 25$, we have, $q = 1$ or $q = 5$,
$$
\begin{aligned}
q = 1: \quad & a = 26, \; b = 74, \; c = 24, \; d = 76. \\
q = 5: \quad & a = 50, \; b = 50, \; c = 40, \; d = 60.
\end{aligned}
$$
