cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A354842 #24 Jun 30 2022 05:58:37
%S A354842 1,4,28,1276,9430,463446,24786396,1340301868
%N A354842 a(n) is the smallest number k such that A354841(k) = n.
%C A354842 Equivalently, the smallest integer k such that the number of primes between k and k+log(k), exclusive, is n.
%e A354842 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 A354842 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 A354842 Cf. A354840 (similar, but between k and k+log(k)^2), A354841.
%K A354842 nonn,more
%O A354842 0,2
%A A354842 _Bernard Schott_, Jun 24 2022
%E A354842 a(3)-a(5) from _Alois P. Heinz_, Jun 25 2022
%E A354842 a(6) from _Amiram Eldar_, Jun 25 2022
%E A354842 a(7) from _David Consiglio, Jr._, Jun 29 2022