For a positive integer $n$, we define $\alpha(n)$ as the average of all positive divisors of $n$, and $\beta(n)$ as the average of all positive integers $k \leq n$ such that $\operatorname{gcd}(k, n)=1$.

Find all positive integers $n$ for which $\alpha(n)=\beta(n)$.
Answer: $n=1$ and $n=6$.
We first note that $n=1$ satisfies the condition.

We now prove that $\beta(n)=\frac{n}{2}$ for $n \geq 2$. Indeed, $\operatorname{gcd}(k, n)=\operatorname{gcd}(k-n, n)=\operatorname{gcd}(n-k, n)$, so $\operatorname{gcd}(k, n)=1$ if and only if $\operatorname{gcd}(n-k, n)=1$. This yields a partition of the positive integers $1 \leq k \leq n-1$ with $\operatorname{gcd}(k, n)=1$ into pairs $(k, n-k)$, which have an average of $\frac{n}{2}$. For $n \geq 2$, $\operatorname{gcd}(n, n)>1$, so we see that the average of all numbers $1 \leq k \leq n$ with $\operatorname{gcd}(k, n)=1$ is also equal to $\frac{n}{2}$. We have now possibly counted $\frac{n}{2}$ twice, but this does not matter since the average is exactly $\frac{n}{2}$.

Prime numbers do not satisfy the condition, because then $\alpha(n)=\frac{n+1}{2}$ and $\beta(n)=\frac{n}{2}$.
Suppose now that $d$ is a positive divisor of $n$ with $d$ not equal to 1 and $n$. Then $2 \leq d \leq \frac{n}{2}$, so $\left(\frac{n}{2}-d\right)(d-2) \geq 0$, so $\frac{n}{2} d+2 d \geq n+d^{2}$, so $\frac{n}{2}+2 \geq \frac{n}{d}+d$.

Suppose now that $n>6$ is composite. We can partition the positive divisors of $n$ into pairs $\left(d, \frac{n}{d}\right)$. The pair $(1, n)$ has an average of $\frac{n+1}{2}$, all other pairs have an average of $\frac{\frac{n}{d}+d}{2} \leq \frac{\frac{n}{2}+2}{2}6$ does not satisfy the condition.

Also $n=4$ does not satisfy the condition, because $\alpha(4)=\frac{1+2+4}{3}=\frac{7}{3}$ while $\beta(4)=\frac{4}{2}=2$. Finally, we check that $n=1$ and $n=6$ indeed satisfy the condition:

- $n=1:$ We have $\alpha(1)=\beta(1)=1$.
- $n=6$: We have $\alpha(3)=\frac{1+2+3+6}{4}=3$ and $\beta(6)=\frac{1+5}{2}=3$.

We conclude that $\alpha(n)=\beta(n)$ if and only if $n=1$ or $n=6$.