%I #17 Sep 01 2021 02:05:57
%S 1,9,19,29,30,31,32,33,35,36,40,44,45,46,47,51,55,57,64,67,70,71,72,
%T 74,81,83,84,92,94,95,96,97,103,104,105,107,108,109,113,116,118,124,
%U 125,127,130,131,132,133,136,138,140,142,144,158,159,160,167,177,182,184,188,191,196,202,203,206
%N Numbers k such that the product of the first k semiprimes is divisible by the sum of the first k semiprimes.
%C What are the asymptotics of a(n)/n as n -> infinity?
%H Robert Israel, <a href="/A347421/b347421.txt">Table of n, a(n) for n = 1..10000</a>
%e 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.
%p R:= NULL:
%p s:= 0: p:= 1: zcount:= 0: scount:= 0:
%p for n from 4 while zcount < 100 do
%p if numtheory:-bigomega(n) = 2 then
%p s:= s+n; p:= p*n;
%p scount:= scount+1;
%p if p mod s = 0 then zcount:= zcount+1; R:= R, scount fi
%p fi
%p od:
%p R;
%t sp = Select[Range[700], PrimeOmega[#] == 2 &]; Position[Divisible[Rest @ FoldList[Times, 1, sp], Accumulate @ sp], True] // Flatten (* _Amiram Eldar_, Aug 31 2021 *)
%o (Python)
%o from sympy import factorint
%o def aupto(limit):
%o alst, i, k, s, p = [], 1, 0, 0, 1
%o while k < limit:
%o if sum(factorint(i).values()) == 2:
%o k += 1; s += i; p *= i
%o if p%s == 0: alst.append(k)
%o i += 1
%o return alst
%o print(aupto(206)) # _Michael S. Branicky_, Aug 31 2021
%o (Julia)
%o using Nemo
%o function A347421List(upto)
%o c, s, p = 0, ZZ(0), ZZ(1)
%o list = Int32[]
%o for n in 4:typemax(Int32)
%o if 2 == sum([e for (p, e) in factor(n)])
%o s += n; p *= n; c += 1
%o if divisible(p, s)
%o c > upto && return list
%o push!(list, c)
%o end
%o end
%o end
%o end
%o A347421List(206) |> println # _Peter Luschny_, Aug 31 2021
%Y Cf. A001358, A062198, A112141, A347413.
%K nonn
%O 1,2
%A _J. M. Bergot_ and _Robert Israel_, Aug 31 2021