Is $f(n) = \sum_{k=0}^n a^k$ bijective in $\mathbb{Z}_m$? How can I find the values of $a$ for which the following function $f:\{0,1,\dots,m-1\} \rightarrow \mathbb{Z}_m$ is bijective for a fixed $m$?
 $$f(n) = \sum_{k=0}^n a^k$$

Not a full answer, but some data: it's always bijective for $a=1$. For some composite moduli, there are arithmetic progressions of $a$ for which it's bijective. For example, when $m=9$, it's bijective for $a=1,4,7$.
In general, there exist moduli $m$ and divisors $d$ of $m$ for which it's bijective precisely when $a\equiv 1\pmod d$. The list for $m\le100$ is:


*

*$m=8$, $d=4$

*$m=9$, $d=3$

*$m=16$, $d=4$

*$m=18$, $d=6$

*$m=24$, $d=12$

*$m=25$, $d=5$

*$m=27$, $d=3$

*$m=32$, $d=4$

*$m=36$, $d=12$

*$m=40$, $d=20$

*$m=45$, $d=15$

*$m=48$, $d=12$

*$m=49$, $d=7$

*$m=50$, $d=10$

*$m=54$, $d=6$

*$m=56$, $d=28$

*$m=63$, $d=21$

*$m=64$, $d=4$

*$m=72$, $d=12$

*$m=75$, $d=15$

*$m=80$, $d=20$

*$m=81$, $d=3$

*$m=88$, $d=44$

*$m=90$, $d=30$

*$m=96$, $d=12$

*$m=98$, $d=14$

*$m=99$, $d=33$

*$m=100$, $d=20$


Observations: the moduli $m$ are precisely the integers whose greatest square factor exceeds $4$. The divisors $d$ always have all prime factors of the corresponding $m$; in fact, $d$ is the largest squarefree divisor of $m$ when $m$ isn't a multiple of $4$, and twice the largest squarefree divisor of $m$ when $m$ is a multiple of $4$.
