|
|
A354842
|
|
a(n) is the smallest number k such that A354841(k) = n.
|
|
2
|
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Equivalently, the smallest integer k such that the number of primes between k and k+log(k), exclusive, is n.
|
|
LINKS
|
|
|
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
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|