For every natural number $a$ and $b$, define the notation $[a,b]$ as the least common multiple of $a $ and $b$ and the notation $(a,b)$ as the greatest common divisor of $a$ and $b$. Find all $n \in \mathbb{N}$ that satisfies
\[
4 \sum_{k=1}^{n} [n,k] = 1 + \sum_{k=1}^{n} (n,k) + 2n^2 \sum_{k=1}^{n} \frac{1}{(n,k)}
\]
We know that $nk = (n, k) [n, k] \Rightarrow [n, k] = \frac{nk}{(n, k)}$
So the given equation reduces to,
$$1 + \sum_{k = 1}^{n}(n, k) + \sum_{k = 1}^{n}\frac{2n(n - 2k)}{(n, k)} = 0$$
Also, $(n, k) = (n, n - k)$
Observe that, $$\frac{2n(n - 2(n - k))}{(n, n - k)} = \frac{2n(2k - n)}{(n, k)} = -\frac{2n(n - 2k)}{(n, k)}$$
Hence $$\sum_{k = 1}^{n}\frac{2n(n - 2k)}{(n, k)} = \frac{2n(n - 2n)}{(n, n)} = -2n$$
(If $k = \frac{n}{2}$ then $\frac{2n(n - \frac{2n}{2})}{(n, \frac{n}{2})} = 0$. Hence only $-2n$ remains in the final sum)
So we must find $n$ such that:
$$1 + \sum_{k = 1}^{n}(n, k) - 2n = 0$$
Case 1: If $n$ is prime
$$1 + (n - 1) + n - 2n = 0$$
Hence all prime $n$ satisfies the given condition
Case 2: If $n$ is not prime
We prove that there are no solutions for this. It will be sufficient to prove:
$$\sum_{k = 1}^{n}(n, k) + 1 > 2n$$$$\sum_{k = 1}^{n}(n, k) \geq 2n$$$$\sum_{k = 1}^{n - 1}(n, k) \geq n$$
We know that $$\sum_{k = 1}^{n - 1}(n ,k) = n - 1$$if $n$ is prime. So for all $n$ not prime,
$$\sum_{k = 1}^{n - 1}(n, k) \geq n$$which is what we needed to prove.
Hence there are no solutions for non-prime $n$