%I #35 Aug 27 2019 09:49:58
%S 6,12,15,18,24,36,45,48,54,72,75,91,96,108,114,135,144,162,192,216,
%T 225,228,288,324,342,375,384,405,432,456,486,576,637,648,675,684,703,
%U 768,864,912,972,1026,1125,1152,1183,1215,1296,1368,1458,1536,1728,1824,1875
%N Numbers n such that s + 1/p = 0, where {d(i), i=1..q} are the q distinct prime divisors of n, s = Sum_{i=1..q} (-1)^(i+1)*i/d(i) and p = Product_{i=1..q} d(i).
%C The semiprimes p*q, p and q prime with q=2*p-1 (A129521) are in the sequence.
%H Amiram Eldar, <a href="/A252044/b252044.txt">Table of n, a(n) for n = 1..1000</a>
%e 18 is in the sequence because the prime factors of 18 are {2,3} => s = 1/2 - 2/3, 1/p = 1/6 and 1/2 - 2/3 + 1/6 = -1/6 + 1/6 = 0.
%e 114 is in the sequence because the prime factors of 114 are {2,3,19} => s = 1/2 - 2/3 + 3/19, 1/p = 1/114 and 1/2 - 2/3 + 3/19 + 1/114 = -1/114 + 1/114 = 0.
%p with(numtheory):nn:=10000:
%p for n from 1 to nn do:
%p x:=factorset(n):n0:=nops(x):
%p s:=sum('i*((-1)^(i+1))/x[i]','i'=1..n0):s0:=product('x[i]','i'=1..n0):
%p p:=product('x[i]','i'=1..n0):s2:=s+1/s0:
%p if s2=0
%p then
%p printf(`%d, `,n):
%p else
%p fi:
%p od:
%t fQ[n_] := Block[{pd = First@# & /@ FactorInteger@ n, rng}, rng = Range@ Length@ pd; 1 == (Times @@ pd)*Total[rng/pd*((-1)^rng)]]; Select[ Range@ 2000, fQ@# &] (* _Robert G. Wilson v_, Jan 11 2015 *)
%o (PARI) isok(n) = {my(vp = factor(n)[,1]~); 1/prod(i=1, #vp, vp[i]) + sum(i=1, #vp, (-1)^(i+1)*i/vp[i]) == 0;} \\ _Michel Marcus_, Jan 12 2015
%Y Cf. A129521, A007947 (product of the distinct prime factors of n).
%K nonn
%O 1,1
%A _Michel Lagneau_, Dec 13 2014