. "This is all true, but judging from the comments, the OP is asking, whether for example in the case $p=7$, $a=3$ the number $r$ belongs to the set $\\{a^0,a^4\\}$." . . . .