Example #1
0
import euler
primeTest = euler.primeGen(10000)
primeList = [x for x in range(len(primeTest)) if primeTest[x] and x > 1000]
for i1 in range(len(primeList)-1):
    for i2 in range(i1+1, len(primeList)):
        m = primeList[i1]
        n = primeList[i2]
        l = n + (n - m)
        if l < 10000 and primeTest[l]:
            if euler.isPermutation(m,n) and euler.isPermutation(m,l):
                print(m,n,l)
Example #2
0
import euler

x = 100
while True:
    x += 1
    flag = True
    for multi in range(2, 7):
        if not euler.isPermutation(x, x * multi):
            flag = False
            break
    if flag:
        print(x)
        break
Example #3
0
import euler
x = 100
while True:
    x += 1
    flag = True
    for multi in range(2, 7):
        if not euler.isPermutation(x, x * multi):
            flag = False
            break
    if flag:
        print(x)
        break