TITLE: Problems regarding $\{x_n \}$ defined by $x_1=1$; $x_n$ is the smallest distinct natural number such that $x_1+...+x_n$ is divisible by $n$.
QUESTION [42 upvotes]: Let me denote a sequence of distinct natural numbers by $x_n$ whose terms are determined as follows:
$x_1$ is $1$ and $x_2$ is the smallest distinct natural number $n$ such that $x_1+x_2$ is divisible by $2$, which is $3$. Similarly $x_n$ is the smallest distinct natural number such that $x_1+...+x_n$ is divisible by $n$. Thus $x_1=1$, $x_2=3$, $x_3=2$.
Now the problem is to show that
(i) $x_n$ is surjective
(ii) $x_{(x_n)}$ is $n$, for example $x_2=3$ and $x_3=2$

REPLY [3 votes]: See this paper, A Curious Bijection on Natural Numbers by B. J. Venkatachala in Journal of Integer Sequences, Vol. 12 (2009).