A376480 a(n) is the least k such that the sum of the first k numbers with n prime factors, counted with multiplicity, is prime.
1, 3, 6, 8, 15, 24, 68, 68, 103, 179, 280, 432, 681, 1078, 1705, 2630, 4110, 6414, 10029, 15611, 24297, 37746, 58506, 90631, 140203, 216630, 334543, 516159, 795637, 1225649, 1886573, 2901816, 4460387, 6851543, 10518523, 16138688
Offset: 1
Keywords
Examples
a(3) = 6 because the sum of the first 6 triprimes is 8 + 12 + 18 + 20 + 27 + 28 = 113 which is prime, and none of the previous partial sums is prime.
Programs
-
Maple
f:= proc(n) uses priqueue; local pq, t, s, count,v, w, p, i; initialize(pq); insert([-2^n, [2$n]],pq); s:= 0; for count from 1 do t:= extract(pq); v:= -t[1]; w:= t[2]; s:= s+v; if isprime(s) then return count fi; p:= nextprime(w[-1]); for i from n to 1 by -1 while w[i] = w[n] do insert([t[1]*(p/w[-1])^(n+1-i),[op(w[1..i-1]),p$(n+1-i)]],pq); od od; end proc: map(f, [$1..36]);
Comments