OFFSET
1,2
COMMENTS
What are the asymptotics of a(n)/n as n -> infinity?
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 9 is a term because the first 9 semiprimes are 4, 6, 9, 10, 14, 15, 21, 22, 25, and 4*6*9*10*14*15*21*22*25 = 5239080000 is divisible by 4+6+9+10+14+15+21+22+25 = 126.
MAPLE
R:= NULL:
s:= 0: p:= 1: zcount:= 0: scount:= 0:
for n from 4 while zcount < 100 do
if numtheory:-bigomega(n) = 2 then
s:= s+n; p:= p*n;
scount:= scount+1;
if p mod s = 0 then zcount:= zcount+1; R:= R, scount fi
fi
od:
R;
MATHEMATICA
sp = Select[Range[700], PrimeOmega[#] == 2 &]; Position[Divisible[Rest @ FoldList[Times, 1, sp], Accumulate @ sp], True] // Flatten (* Amiram Eldar, Aug 31 2021 *)
PROG
(Python)
from sympy import factorint
def aupto(limit):
alst, i, k, s, p = [], 1, 0, 0, 1
while k < limit:
if sum(factorint(i).values()) == 2:
k += 1; s += i; p *= i
if p%s == 0: alst.append(k)
i += 1
return alst
print(aupto(206)) # Michael S. Branicky, Aug 31 2021
(Julia)
using Nemo
function A347421List(upto)
c, s, p = 0, ZZ(0), ZZ(1)
list = Int32[]
for n in 4:typemax(Int32)
if 2 == sum([e for (p, e) in factor(n)])
s += n; p *= n; c += 1
if divisible(p, s)
c > upto && return list
push!(list, c)
end
end
end
end
A347421List(206) |> println # Peter Luschny, Aug 31 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 31 2021
STATUS
approved