A347421 Numbers k such that the product of the first k semiprimes is divisible by the sum of the first k semiprimes.
1, 9, 19, 29, 30, 31, 32, 33, 35, 36, 40, 44, 45, 46, 47, 51, 55, 57, 64, 67, 70, 71, 72, 74, 81, 83, 84, 92, 94, 95, 96, 97, 103, 104, 105, 107, 108, 109, 113, 116, 118, 124, 125, 127, 130, 131, 132, 133, 136, 138, 140, 142, 144, 158, 159, 160, 167, 177, 182, 184, 188, 191, 196, 202, 203, 206
Offset: 1
Keywords
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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
-
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 *)
-
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
Comments