$\newcommand{\N}{\mathbb{N}}$Let $\N$ denote the set of non-negative integers. We inductively define a sequence $a:\N\to\N$ by: - $a(0) = 0, a(1) = 1$ and - $a(n) = \big(\sum_{k=0}^{n-1}a(k)\big)\text{ mod } n$, for $n\geq 2$. This sequence starts with $0, 1, 1, 2, 0, 4, 2, 3,...$; more members can be calculated with [this ${\mathtt{C}}$ file](https://github.com/dominiczypen/Modular_sum_sequence/blob/main/modular_sum.c). So far this sequence doesn't seem to be listed in the [online encyclopedia of integer sequences (OEIS)](https://oeis.org/). **Question.** Is $a$ surjective? If yes, is $a^{-1}(\{m\})$ infinite for all $m\in\N$?