OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Chai Wah Wu)
Peter Luschny, Zumkeller Numbers.
MAPLE
with(NumberTheory):
isA171641 := proc(n) local s, p, i, P;
s := SumOfDivisors(n);
if s::odd or s < n*2 then false else
P := mul(1 + x^i, i in Divisors(n));
0 = coeff(P, x, s/2) fi end:
select(isA171641, [seq(1..4100)]); # Peter Luschny, Oct 19 2024
MATHEMATICA
Reap[For[n = 2, n <= 4000, n = n+2, sigma = DivisorSigma[1, n]; If[sigma >= 2n && EvenQ[sigma] && Coefficient[ Times @@ (1 + x^Divisors[n]) // Expand, x, sigma/2] == 0, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jul 26 2013 *)
PROG
(Python)
from sympy import divisors
import numpy as np
A171641 = []
for n in range(2, 10**6):
d = divisors(n)
s = sum(d)
if not s % 2 and 2*n <= s:
d.remove(n)
s2, ld = int(s/2-n), 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[ld, s2] != s2:
A171641.append(n)
# Chai Wah Wu, Aug 19 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Dec 14 2009
STATUS
approved