OFFSET
1,1
COMMENTS
EXAMPLE
36 is a term since its set of coreful divisors, {6, 12, 18, 36}, can be partitioned into the two disjoint sets, {6, 12, 18} and {36}, whose sums are equal: 6 + 12 + 18 = 36.
MATHEMATICA
corZumQ[n_] := Module[{r = Times @@ FactorInteger[n][[;; , 1]], d, sum, x}, d = r * Divisors[n/r]; (sum = Plus @@ d) >= 2*n && EvenQ[sum] && CoefficientList[Product[1 + x^i, {i, d}], x][[1 + sum/2]] > 0]; Select[Range[1800], corZumQ]
PROG
(Python)
from itertools import count, islice
from sympy import primefactors, divisors
def A339979_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
f = primefactors(n)
d = [x for x in divisors(n) if primefactors(x)==f]
s = sum(d)
if s&1^1 and n<<1<=s:
d = d[:-1]
s2, ld = (s>>1)-n, len(d)
z = [[0 for _ in range(s2+1)] for _ in range(ld+1)]
for i in range(1, ld+1):
y = min(d[i-1], s2+1)
z[i][:y] = z[i-1][:y]
for j in range(y, s2+1):
z[i][j] = max(z[i-1][j], z[i-1][j-y]+y)
if z[i][s2] == s2:
yield n
break
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Dec 25 2020
STATUS
approved