I am trying to create a loop in Mathamtica, where i get all $i$'s (with a certain bound, of course) for which the following expression holds: $7^{41\ast i}\equiv 3^{41}\, mod\, p$, where $p$ is just some number. I tried to use $while$, but it didn't work. :( Can anybody help me? Is it possible to calculate this?
Thank you in advance!
Try