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

A354842
a(n) is the smallest number k such that A354841(k) = n.
2
1, 4, 28, 1276, 9430, 463446, 24786396, 1340301868
OFFSET
0,2
COMMENTS
Equivalently, the smallest integer k such that the number of primes between k and k+log(k), exclusive, is n.
EXAMPLE
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.
MATHEMATICA
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 *)
CROSSREFS
Cf. A354840 (similar, but between k and k+log(k)^2), A354841.
Sequence in context: A203279 A081792 A336622 * A084594 A334598 A000838
KEYWORD
nonn,more
AUTHOR
Bernard Schott, Jun 24 2022
EXTENSIONS
a(3)-a(5) from Alois P. Heinz, Jun 25 2022
a(6) from Amiram Eldar, Jun 25 2022
a(7) from David Consiglio, Jr., Jun 29 2022
STATUS
approved