Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I've developed a new method of calculating primes

Name: Anonymous 2014-04-24 15:07


def gcd(a,b):
if b==0:
return a
return gcd(b,a%b)

prod = 2
x = 3
greatest_prime = 0
while greatest_prime < 100000:
if gcd(x,prod) == 1:
prod*=x
greatest_prime = x
x+=2

print(greatest_prime)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List