login
A392361
a(n) is the minimum number of proper divisors of the semiperfect number k = A005835(n) that sum to k.
3
3, 3, 3, 4, 3, 5, 3, 3, 4, 3, 3, 3, 5, 3, 3, 3, 3, 4, 3, 6, 3, 3, 4, 3, 6, 3, 5, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 6, 3, 3, 3, 5, 3, 4, 3, 6, 3, 3, 4, 3, 5, 3, 3, 3, 3, 3, 3, 4, 3, 3, 6, 3, 4, 3, 3, 3, 3, 7, 3, 5, 3, 3, 4, 3, 3, 3, 4, 3, 3, 7, 6, 3, 3, 5, 3, 8, 3, 3, 4, 3, 3, 5, 3, 4, 3, 3
OFFSET
1,1
COMMENTS
a(n) <= A390834(n), with equality if and only if A005835(n) is in A064771.
a(n) >= 3, with equality if and only if A005835(n) is a multiple of 6.
a(m) <= a(n) if A005835(m) is a multiple of A005835(n).
LINKS
EXAMPLE
A005835(34) = 144 = 24 + 48 + 72, and {24, 48, 72} is the smallest set of proper divisors of 144 that sums to 144, so a(34) = 3.
MAPLE
issum:= proc(n, S) option remember; local m, Sp, v; # return a subset of S summing to n
Sp:= select(`<=`, S, n);
if n > convert(Sp, `+`) then return false fi;
if member(n, Sp) then return {n} fi;
m:= max(Sp); Sp:= Sp minus {m};
v:= procname(n-m, Sp);
if v <> false then return v union {m} fi;
procname(n, Sp)
end proc:
issumle:= proc(n, S, k) option remember; local m, Sp, v;
if k = 0 then return false fi;
Sp:= select(`<=`, S, n);
if n > convert(Sp, `+`) then return false fi;
if member(n, Sp) then return {n} fi;
m:= max(Sp); Sp:= Sp minus {m};
v:= procname(n-m, Sp, k-1);
if v <> false then return v union {m} fi;
procname(n, Sp, k)
end proc:
f:= proc(n) local DD, v, k, kp;
if n mod 6 = 0 then return 3 fi;
DD:= numtheory:-divisors(n) minus {n};
v:= issum(n, DD);
if v = false then return NULL fi;
k:= nops(v);
do
v:= issumle(n, DD, k-1);
if v = false then return k fi;
k:= nops(v)
od;
end proc:
map(f, [$2..500]);
PROG
(Python)
from sympy import proper_divisors
def min_divs(n: int) -> int:
if n <= 1: return -1
dp = {0: 0}
for d in proper_divisors(n):
n_dp = dp.copy()
for s, count in dp.items():
n_sum = s + d
if n_sum <= n:
n_count = count + 1
if n_sum not in n_dp or n_count < n_dp[n_sum]:
n_dp[n_sum] = n_count
dp = n_dp
return dp.get(n, -1)
print([a for n in range(1, 500) if (a := min_divs(n)) > 0]) # Peter Luschny, Jan 08 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Jan 08 2026
STATUS
approved