OFFSET
1,1
COMMENTS
The semiprimes p*q, p and q prime with q=2*p-1 (A129521) are in the sequence.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
EXAMPLE
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.
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.
MAPLE
with(numtheory):nn:=10000:
for n from 1 to nn do:
x:=factorset(n):n0:=nops(x):
s:=sum('i*((-1)^(i+1))/x[i]', 'i'=1..n0):s0:=product('x[i]', 'i'=1..n0):
p:=product('x[i]', 'i'=1..n0):s2:=s+1/s0:
if s2=0
then
printf(`%d, `, n):
else
fi:
od:
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Dec 13 2014
STATUS
approved