Skip to content

Instantly share code, notes, and snippets.

@SahilC
Created September 10, 2013 13:22
Show Gist options
  • Save SahilC/6509311 to your computer and use it in GitHub Desktop.
Save SahilC/6509311 to your computer and use it in GitHub Desktop.
Strangely awesome way to find prime numbers
def prime(n):
for i in range(3,n):
if 2**(i-1)%i==1:
print i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment