Positive integer solutions of $\frac{1}{a_1}+\frac{2}{a_2}+\frac{3}{a_3}+\cdots+\frac{n}{a_n}=\frac{a_1+a_2+a_3+\cdots+a_n}{2}$
Find all ordered tuples of positive integers $(a_1,a_2,a_3,\ldots,a_n)$ such that $\frac{1}{a_1}+\frac{2}{a_2}+\frac{3}{a_3}+\cdots+\frac{n}{a_n}=\frac{a_1+a_2+a_3+\cdots+a_n}{2}$
The only thing I have been able to think about is using inequalities. I have tried to apply AM-GM, Titu's lemma etc.. Cauchy-Schwarz gives the following thing:
$$(\frac{1}{a_1}+\frac{2}{a_2}+\frac{3}{a_3}+\cdots+\frac{n}{a_n})(a_1+\cdots a_n) \ge (\sqrt{1}+\sqrt{2}+\cdots \sqrt{n})^2$$
$$(a_1+\cdots a_n)^2\ge 2(\sqrt{1}+\cdots \sqrt {n})^2$$
which doesn't really help us at all.
I have also tried considering smaller cases. For $n=2$,
$$a_1a_2(a_1+a_2)=4a_1+2a_2$$ which tells us that $2a_2=ka_1$ and $8a_1=pa_2=ka_1p\implies kp=8$. This should now give us all the solutions by checking all the cases.
So how can we even begin to attack this problem?
Solution 1:
Partial solution: If $n+1$ is a square, then set $a_1=a_2=\cdots=a_n=\sqrt{n+1}$.
Then the LHS is $$(1+2+\cdots+n)\frac{1}{\sqrt{n+1}}=\frac{n(n+1)}{2\sqrt{n+1}}=\frac{1}{2}n\sqrt{n+1}$$
which agrees with the RHS.
More of a partial solution, following @Stefan4024's induction idea. Start with a solution of the preceding form, then add two more terms to the LHS, namely $\frac{n+1}{b}+\frac{n+2}{b}$. The equation will still balance if $$\frac{1}{b}(n+1+n+2)=\frac{b+b}{2}$$ or $b^2=2n+3$. Hence, we seek $n$ satisfying (1) $n+1=a^2$; and (2) $2n+3=b^2$. We can eliminate the $n$ to get Pell's equation: $$b^2-2a^2=1$$ This has infinitely many solutions. The smallest is $b=3, a=2$ ($n=3$, 5 terms). The next smallest is $b=17, a=12$ ($n=143$, 145 terms). The next one is $b=99, a=70$ ($n=4899$, 4901 terms).