Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. n=100000;
  2. nop=0;
  3. nop2=0;
  4. for i =1:2:n
  5. if isprime(i)
  6. nop2=nop2+1;
  7. else
  8. if pow(5,i-1,i)==1 && pow(3,i-1,i) && pow(2,i-1,i)
  9. i
  10. nop=nop+1;
  11. end
  12. end
  13. end
  14. nop
  15. nop2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement