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 smallest number k such that A354841(k) = n.
2

%I #24 Jun 30 2022 05:58:37

%S 1,4,28,1276,9430,463446,24786396,1340301868

%N a(n) is the smallest number k such that A354841(k) = n.

%C Equivalently, the smallest integer k such that the number of primes between k and k+log(k), exclusive, is n.

%e In the interval ]28; 28+log(28)[ = ]28; 31.332...[, there are two primes 29 and 31 and this is the first such interval with 2 primes, hence a(2) = 28.

%t seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = Count[Range[n + 1, n + Log[n]], _?PrimeQ] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[5, 10^5] (* _Amiram Eldar_, Jun 25 2022 *)

%Y Cf. A354840 (similar, but between k and k+log(k)^2), A354841.

%K nonn,more

%O 0,2

%A _Bernard Schott_, Jun 24 2022

%E a(3)-a(5) from _Alois P. Heinz_, Jun 25 2022

%E a(6) from _Amiram Eldar_, Jun 25 2022

%E a(7) from _David Consiglio, Jr._, Jun 29 2022