OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1000
MATHEMATICA
ZumkellerQ[n_] := Module[{d = Divisors[n], t, ds, x}, ds = Plus @@ d; If[ Mod[ds, 2] > 0, False, t = CoefficientList[ Product[1 + x^i, {i, d}], x]; t[[1 + ds/2]] > 0]]; s = Select[ Range@ 10399, ZumkellerQ]; Select[s, PrimeQ[ DivisorSigma[1, # ]/2 - # ] &] (* Robert G. Wilson v, Aug 03 2010 *)
PROG
(Python)
from sympy import isprime, divisors
from sympy.combinatorics.subsets import Subset
for n in range(1, 10**5):
d = divisors(n)
s = sum(d)
if not s % 2 and max(d)<= s//2 and isprime(s//2-n):
for x in range(1, 2**len(d)):
if sum(Subset.unrank_binary(x, d).subset) == s//2:
print(n, end=', ')
break
# Chai Wah Wu, Aug 13 2014
(Python)
from sympy import isprime, divisors
import numpy as np
A175583 = []
for n in range(1, 10**5):
d = divisors(n)
s = sum(d)
if not s % 2 and 2*n <= s and isprime(s//2-n):
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[i, s2] == s2:
A175583.append(n)
break
# Chai Wah Wu, Aug 20 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladislav-Stepan Malakhovsky and Juri-Stepan Gerasimov, Jul 15 2010
EXTENSIONS
a(17) - a(44) from Robert G. Wilson v, Aug 03 2010
Definition and example corrected by Chai Wah Wu, Aug 13 2014
STATUS
approved