Felix Laurie von Massenbach | 982c42c | 2014-05-27 12:55:20 +0100 | [diff] [blame] | 1 | primes = [2, 3, 5, 7, 11] |
| 2 | safe = False # Not sure if the period's right on safe primes. |
Felix Laurie von Massenbach | 8a12085 | 2014-05-27 02:13:33 +0100 | [diff] [blame] | 3 | |
Felix Laurie von Massenbach | 982c42c | 2014-05-27 12:55:20 +0100 | [diff] [blame] | 4 | muliplier = 1 if not safe else 2 |
Felix Laurie von Massenbach | 8a12085 | 2014-05-27 02:13:33 +0100 | [diff] [blame] | 5 | for p in primes: |
| 6 | muliplier *= p |
| 7 | |
| 8 | offsets = [] |
| 9 | for x in range(3, muliplier + 3, 2): |
| 10 | prime = True |
| 11 | for p in primes: |
| 12 | if not x % p or (safe and not ((x - 1) / 2) % p): |
| 13 | prime = False |
| 14 | break |
| 15 | |
| 16 | if prime: |
| 17 | offsets.append(x) |
| 18 | |
| 19 | print(offsets) |
| 20 | print(len(offsets)) |
| 21 | print(muliplier) |