|
|
A175583
|
|
Zumkeller numbers n such that sigma(n)/2 - n is prime.
|
|
1
|
|
|
12, 40, 70, 80, 88, 160, 272, 320, 490, 544, 928, 1184, 1312, 1332, 1575, 1696, 1888, 2420, 2560, 2624, 2628, 3380, 3392, 3712, 3920, 4030, 4100, 4736, 5120, 5248, 5696, 5830, 6464, 6664, 6784, 7232, 7424, 7808, 8228, 8704, 8784, 8925, 9680, 10100
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
|
|
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
(Python)
from sympy import isprime, divisors
import numpy as np
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:
break
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Definition and example corrected by Chai Wah Wu, Aug 13 2014
|
|
STATUS
|
approved
|
|
|
|