OFFSET
2,1
COMMENTS
a(n) <= A164291(n).
LINKS
Robert Israel, Table of n, a(n) for n = 2..923
EXAMPLE
a(8) = 13 because between 13 and the next prime, 17, are 14 with 2 prime factors, 15 with 2, 16 with 4 (counted with multiplicity), for a total of 2+2+4=8, and this is the first prime for which the total of 8 occurs.
MAPLE
N:= 100: # to get a(2)..a(N)
V:= Array(2..N): count:= 0:
q:= 3:
while count < N-1 do
p:= q;
q:= nextprime(q);
v:= add(numtheory:-bigomega(t), t=p+1..q-1);
if v > N or V[v] > 0 then next fi;
V[v]:= p; count:= count+1;
od:
convert(V, list);
MATHEMATICA
Module[{nn=60, pfm}, pfm=Table[{p, Total[PrimeOmega[Range[Prime[p]+1, Prime[ p+1]-1]]]}, {p, 2, 1000}]; Prime[#]&/@Table[SelectFirst[pfm, #[[2]]==n&], {n, 2, nn}]][[All, 1]] (* Harvey P. Dale, Aug 25 2022 *)
PROG
(PARI) count(start, end) = my(i=0); for(k=start+1, end-1, i+=bigomega(k)); i
a(n) = forprime(p=1, , if(count(p, nextprime(p+1))==n, return(p))) \\ Felix Fröhlich, May 31 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, May 31 2019
STATUS
approved