OFFSET
1,1
COMMENTS
REFERENCES
S. Clark et al., Zumkeller numbers, Mathematical Abundance Conference, April 2008.
LINKS
Robert Israel, Table of n, a(n) for n = 1..9188 (n=1..1309 from Chai Wah Wu)
K. P. S. Bhaskara Rao and Yuejian Peng, On Zumkeller Numbers, Journal of Number Theory, Volume 133, Issue 4, April 2013, pp. 1135-1155.
Pankaj Jyoti Mahanta, Manjil P. Saikia, and Daniel Yaqubi, Some properties of Zumkeller numbers and k-layered numbers, arXiv:2008.11096 [math.NT], 2020.
EXAMPLE
Proper divisors of 225 are 1, 3, 5, 9, 15, 25, 45, 75 and 1+3+15+25+45=5+9+75.
MAPLE
filter:= proc(n) local L, s, t, nL, B, j, k;
L:= numtheory:-divisors(n) minus {n};
s:= convert(L, `+`);
if s::odd then return false fi;
t:= s/2;
nL:= nops(L);
B:= Array(0..t, 1..nL);
B[0, 1]:= 1;
B[L[1], 1]:= 1;
for j from 2 to nL do
B[.., j]:= B[.., j-1];
for k from L[j] to t do
B[k, j]:= B[k, j] + B[k-L[j], j-1]
od:
if B[t, j] > 0 then return true fi;
od:
false
end:
select(filter, [$2..300]); # Robert Israel, Aug 19 2014
MATHEMATICA
filterQ[n_] := Module[{L, s, t, nL, B, j, k},
L = Most[Divisors[n]];
s = Total[L];
If[OddQ[s], Return[False]];
t = s/2;
nL = Length[L];
B[_, _] = 0;
B[0, 1] = 1;
B[L[[1]], 1] = 1;
For[j = 2, j <= nL, j++,
Do[B[k, j] = B[k, j-1], {k, 0, t}];
For[k = L[[j]], k <= t, k++,
B[k, j] = B[k, j] + B[k-L[[j]], j-1]
];
If[ B[t, j] > 0, Return[True]];
];
False
];
Select[Range[2, 300], filterQ] (* Jean-François Alcover, Mar 04 2019, after Robert Israel *)
hzQ[n_] := Module[{d = Most @ Divisors[n], sum, x}, sum = Plus @@ d; EvenQ[sum] && CoefficientList[Product[1 + x^i, {i, d}], x][[1 + sum/2]] > 0]; Select[Range[2, 1000], hzQ] (* Amiram Eldar, May 03 2020 *)
PROG
(Python)
from sympy.combinatorics.subsets import Subset
from sympy import divisors
A246198 = []
for n in range(2, 10**3):
d = divisors(n)
d.remove(n)
s, dmax = sum(d), max(d)
if not s % 2 and 2*dmax <= s:
d.remove(dmax)
s2 = s/2-dmax
for x in range(2**len(d)):
if sum(Subset.unrank_binary(x, d).subset) == s2:
A246198.append(n)
break
(Python)
from sympy import divisors
import numpy as np
A246198 = []
for n in range(2, 10**3):
d = divisors(n)
d.remove(n)
s, dmax = sum(d), max(d)
if not s % 2 and 2*dmax <= s:
d.remove(dmax)
s2, ld = int(s/2-dmax), len(d)
z = np.zeros((ld+1, s2+1), dtype=int)
for i in range(1, ld+1):
y = min(d[i-1], s2+1)
z[i, range(y)] = z[i-1, range(y)]
z[i, range(y, s2+1)] = np.maximum(z[i-1, range(y, s2+1)], z[i-1, range(0, s2+1-y)]+y)
if z[i, s2] == s2:
A246198.append(n)
break
# Chai Wah Wu, Aug 19 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Aug 18 2014
STATUS
approved