Can you check that there are no errors in this proof I wrote?
Here's the problem (from the 2002 Romanian Olympiad):
Let $p, q$ be two distinct primes. Prove that there are positive integers $a, b$ so that the arithmetic mean of all the divisors of the number $n = p^a q^b$ is also an integer.
Here's my attempt:
Since $p$ and $q$ are distinct, either $p \neq 2$ or $q \neq 2$. Assume WLOG that $q \neq 2$.
Choose $$a = (q+1)/2 - 1 $$ $$b=1.$$
Note that $a$ is a positive integer because $q$ is odd and $q \geq 3$.
It now follows that $p^a q^b = p^a q$ and has divisors $$p^0, p^1, \dots, p^a,$$ $$p^0 q, p^1 q, \dots, p^a q.$$
There are $2(a+1)$ of them, so their arithmetic mean is $$ \frac{1}{2(a+1)}\left[ \left( p^0 + p^1 + \dots + p^a \right) + \left( p^0 q + p^1 q + \dots + p^a q \right) \right]\\ = \frac{1}{2\left(\frac{q+1}{2}\right)}\left[ \left( p^0 + p^1 + \dots + p^a \right) + q \left( p^0 + p^1 + \dots + p^a \right) \right]\\ = \frac{1}{q+1}\left[ (q+1) \left( p^0 + p^1 + \dots + p^a \right) \right]\\ = p^0 + p^1 + \dots + p^a. $$
This is an integer as desired.