summaryrefslogtreecommitdiffstats
path: root/Src/PyCatcher/foo.py
diff options
context:
space:
mode:
Diffstat (limited to 'Src/PyCatcher/foo.py')
-rw-r--r--Src/PyCatcher/foo.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/Src/PyCatcher/foo.py b/Src/PyCatcher/foo.py
new file mode 100644
index 0000000..d6ce582
--- /dev/null
+++ b/Src/PyCatcher/foo.py
@@ -0,0 +1,24 @@
+max_prime = 30#775146
+candidates = range(2,max_prime)
+current_prime = 5
+primes = [2,3,5]
+
+while candidates and current_prime < max_prime:
+ if len(primes) %10 == 0:
+ print current_prime
+ for number in candidates:
+ if number % current_prime == 0:
+ candidates.remove(number)
+ current_prime = candidates[0]
+ candidates.remove(current_prime)
+ primes.append(current_prime)
+
+print primes
+
+result = 0
+
+for number in primes:
+ if 600851475143%number ==0:
+ result = number
+
+print result