import math


def smallest_multiple(n):
    """ Smallest multiple of all numbers from 2 to n. """
    multiple = 1
    for i in range(2, n+1):
        if multiple % i:
            multiple *= i // math.gcd(multiple, i)
    return multiple