Is it possible to construct a bijection $f: \mathbb{N} \mapsto \mathbb{N}$ such that $n$ divides $\sum_{k=1}^{n} f(k)$ for every $n \in \mathbb{N}$?
At first, I've tried to construct such function but without any success. So now I'm convinced that such $f$ does not exist, but I could not solve it using the standard approaches/tricks in these kinds of problems. So, what is the trick that I'm missing?
Thanks!
Such a sequence can in fact be constructed. Suppose $f(1),\ldots,f(n-1)$ have been chosen, and let $a$ be distinct from all of these. We show how to force either $f(n)=a$ or $f(n+1)=a$. If, for example, we always force the smallest $a$ which is not in the range, we will end up with a bijection.
Let $S=f(1)+\cdots+f(n-1)$; there are two possibilities. If $S+a\equiv 0\ (\textrm{mod } n)$, we can choose $f(n)=a$. If not, we set $f(n)=kn-S$ for some integer $k$, where $k\equiv a\ (\textrm{mod }(n+1))$, and we will then choose $f(n+1)=a$. Then $f(1)+\cdots+f(n)=kn$, so the divisibility condition holds at $n$; we can choose $k$ as large as we want to ensure $f(n)$ is distinct from $f(1),\ldots,f(n-1)$.
Finally, $$f(1)+\cdots+f(n+1)=kn+a \equiv -a+a \equiv 0\ (\textrm{mod }(n+1)),$$ so the divisibility condition holds here as well.
If we make the minimum choice at each step, we obtain a bijection which begins like this: $1, 3, 2, 10, 4, 52, 5, 43, 6, 54, 7, 65, 8, 76, 9, 103, 11, 99, 12, 110,\cdots$