Value 4 when computing primes using Fermat's Little Theorem
<p>I wrote a program which is not important now, but it was on this Fermat's theorem. Now the problem is the output was not as expected. I know the question is not too good or off the mark but I just can't solve the error which is that there is an occurrence of 4 here in the output which must not be there. I'm unable to debug it.</p>

<p>The theorem: <img src="https://i.stack.imgur.com/Ca0Y9.png" alt=" This Image ">  </p>

<pre><code>for x in range(1,100):
 m=5**(x-1)
 if m%x&gt;1:    
   pass
 else:
   print"prime",x
</code></pre>

<p>Output is this:</p>

<p><img src="https://i.stack.imgur.com/vY2mC.png" alt="This is output "></p>