OFFSET
1,2
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..632 (terms 1..300 from Michael S. Branicky)
EXAMPLE
6 is the least number for which there exist exactly 6 subsets of divisors of 6: [[1], [2], [3], [6], [1, 2], [1, 2, 3]] such that 6 is respectively divisible by their sums [1, 2, 3, 6, 3, 6].
45 is the least number for which there exist exactly 8 subsets of divisors of 45: [[1], [3], [5], [9], [15], [45], [1, 3, 5], [1, 5, 9]] such that 45 is respectively divisible by their sums [1, 3, 5, 9, 15, 45, 9, 15].
PROG
(PARI) isok(k, n) = my(d = divisors(k), nb=0); forsubset(#d, s, if (#s && !(k % sum(i=1, #s, d[s[i]])), nb++; if (nb>n, return(0)))); nb==n;
a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Jan 26 2026
(Python)
from itertools import chain, combinations, count, islice
from sympy import divisors
def powerset(s): # skipping empty set
return chain.from_iterable(combinations(s, r) for r in range(1, len(s)+1))
def a(n):
for k in count(1):
divs = divisors(k)
if 2**len(divs) - 1 < n: continue
c = 1 # count {k}
for s in powerset(divs[:-1]):
if k%sum(s) == 0: c += 1
if c > n: break
if c == n: return k
print([a(n) for n in range(1, 31)]) # Michael S. Branicky, Jan 28 2026
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Jean-Marc Rebert, Jan 26 2026
EXTENSIONS
More terms from Michel Marcus, Jan 26 2026
STATUS
approved
