0

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!

Lullaby
  • 2,361
  • I would try something like: Table[Table[If[7^(41*i) == Mod[3^(41), p], i, 0], {i, 1, 12}], {p, 1, 12}] But I don't know if it is correct and what values to try. – Mats Granvik Nov 10 '13 at 13:47

1 Answers1

0

Try

p = 5;
modTarget = Mod[3^41, p];
Select[Range[1000], Mod[7^(41 #), p] == modTarget &]