A384632 a(0)=0. For each digit d in the sequence, let a(n) equal the smallest unused integer which has at least d divisors.
0, 1, 2, 3, 4, 6, 12, 5, 7, 16, 24, 8, 18, 9, 10, 30, 11, 36, 48, 13, 14, 15, 17, 19, 20, 21, 28, 22, 40, 23, 25, 26, 27, 29, 32, 31, 42, 33, 60, 34, 35, 37, 38, 39, 54, 41, 43, 44, 45, 46, 49, 47, 50, 51, 52, 53, 56, 55, 72, 57, 58, 62, 59, 63, 61, 64, 65
Offset: 0
Examples
a(0) = 0. a(1) = Smallest unused integer with at least 0 divisors = 1. a(2) = Smallest unused integer with at least 1 divisor = 2. a(3) = Smallest unused integer with at least 2 divisors = 3. a(4) = Smallest unused integer with at least 3 divisors = 4. a(5) = Smallest unused integer with at least 4 divisors = 6. a(6) = Smallest unused integer with at least 6 divisors = 12. a(7) = Smallest unused integer with at least 1 divisor = 5. a(8) = Smallest unused integer with at least 2 divisors = 7.
Programs
-
Python
from sympy import divisor_count a = [0] for n in range(100): if a[n] >= 10: split = [int(d) for d in str(a[n])] else: split = [a[n]] for s in split: num = 1 while True: if divisor_count(num) >= s and num not in a: a.append(num) break num += 1 print(a)
Comments