login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A308487
a(n) is the least prime p such that the total number of prime factors, with multiplicity, of the numbers between p and the next prime is n.
1
3, 11, 59, 71, 239, 7, 13, 103, 97, 79, 127, 73, 23, 31, 61, 157, 373, 383, 251, 89, 359, 401, 683, 701, 139, 337, 283, 241, 211, 631, 1471, 199, 1399, 661, 113, 619, 1511, 509, 293, 953, 317, 773, 1583, 863, 2423, 1831, 2251, 1933, 1381, 4057, 2803, 523, 1069, 2861, 1259, 1759, 3803, 4159, 4703
OFFSET
2,1
COMMENTS
a(n) <= A164291(n).
LINKS
FORMULA
A077218(A000720(a(n))) = n.
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