0
$\begingroup$

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!

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$ Commented Nov 10, 2013 at 13:47

1 Answer 1

0
$\begingroup$

Try

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .