Beispiel #1
0
def smallest_multiple(n):
    result = 2**int(math.log(n, 2))
    result *= 3**int(math.log(n, 3))
    prime = pe3.next_prime()
    while prime < n:
        result *= prime**int(math.log(n, prime))
        prime = pe3.next_prime()
    return result
Beispiel #2
0
def primes() :
    i = 1
    while True :
        i = next_prime(i+1)
        yield i