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”).

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

%I #14 Jun 11 2023 14:20:44

%S 3,11,59,71,239,7,13,103,97,79,127,73,23,31,61,157,373,383,251,89,359,

%T 401,683,701,139,337,283,241,211,631,1471,199,1399,661,113,619,1511,

%U 509,293,953,317,773,1583,863,2423,1831,2251,1933,1381,4057,2803,523,1069,2861,1259,1759,3803,4159,4703

%N 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.

%C a(n) <= A164291(n).

%H Robert Israel, <a href="/A308487/b308487.txt">Table of n, a(n) for n = 2..923</a>

%F A077218(A000720(a(n))) = n.

%e 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.

%p N:= 100: # to get a(2)..a(N)

%p V:= Array(2..N): count:= 0:

%p q:= 3:

%p while count < N-1 do

%p p:= q;

%p q:= nextprime(q);

%p v:= add(numtheory:-bigomega(t),t=p+1..q-1);

%p if v > N or V[v] > 0 then next fi;

%p V[v]:= p; count:= count+1;

%p od:

%p convert(V,list);

%t 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 *)

%o (PARI) count(start, end) = my(i=0); for(k=start+1, end-1, i+=bigomega(k)); i

%o a(n) = forprime(p=1, , if(count(p, nextprime(p+1))==n, return(p))) \\ _Felix Fröhlich_, May 31 2019

%Y Cf. A000720, A001222, A077218, A164291.

%K nonn

%O 2,1

%A _J. M. Bergot_ and _Robert Israel_, May 31 2019