I am new to Mathematica and I have a For loop like so:
For[i = 0, i < 15, i++, PowerMod[i, -1, 15]]
Currently it doesn't output anything. The calculation I am performing is i^-1 mod n. I want t his loop to output the values of i ONLY where i = i^-1 mod n. How can i accomplish this?
Edit
###Edit II can print the output by wrapping PowerMod in Print[]. How can I accomplish printing i and then the result from PowerMod? Here is what I tried, but it is incorrect since I don't know the syntax to use here:
For[i = 0, i < 15, i++, Print[i] Print[PowerMod[i, -1, 15]]]
This prints i and then the result of PowerMod below it. How can I get them on the same line?