login
A376481
a(n) is the first partial sum of the numbers with n prime factors, counted with multiplicity, that is prime.
1
2, 19, 113, 367, 2161, 9791, 127781, 255019, 1090421, 6031891, 27701213, 124489399, 584289157, 2772603503, 13172647021, 59835586439, 279157058197, 1302096836543, 6106904040253, 28448035817911, 132707231124773, 617761562462063, 2866868448935501, 13305669027668711, 61658859228014773
OFFSET
1,1
COMMENTS
a(n) is the sum of the first A376480(n) numbers with n prime factors, counted with multiplicity.
EXAMPLE
a(3) = 113 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.
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 s 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]);
CROSSREFS
Sequence in context: A240124 A278405 A285791 * A101253 A082291 A055518
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 24 2024
STATUS
approved