def is_n_pandigital(n):
    """Tests if n is 1-len(n) pandigital."""
    if len(str(n)) > 9:
        return False
    if len(str(n)) != len(set(str(n))):
        return False
    m = len(str(n))
    digits = list(range(1, m+1))
    filtered = [d for d in str(n) if int(d) in digits]
    return len(str(n)) == len(filtered)