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.

A337788 The number of primes between n exclusive and n+primepi(n) inclusive.

This page as a plain text file.
%I A337788 #39 Aug 28 2024 18:48:02
%S A337788 0,1,1,1,1,1,1,1,2,2,1,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,3,2,2,2,3,3,3,
%T A337788 3,4,3,3,3,3,3,3,2,2,3,3,3,3,3,3,3,4,3,3,4,4,5,5,4,4,4,4,4,4,5,5,4,4,
%U A337788 4,5,4,4,3,3,3,4,4,4,4,4,5,5,4,5,5,6,6
%N A337788 The number of primes between n exclusive and n+primepi(n) inclusive.
%C A337788 There is at least one prime number in the range of (n, n + primepi(n)], or a(n) >= 1, for n >= 2 (see Corollary 1 in the paper by Ya-Ping Lu attached in the links).
%C A337788 See also the Panaitopol link. - _Charles R Greathouse IV_, Jul 12 2024
%H A337788 Harvey P. Dale, <a href="/A337788/b337788.txt">Table of n, a(n) for n = 1..1000</a>
%H A337788 Ya-Ping Lu, <a href="/A337788/a337788.pdf">Lower Bounds for the Number of Primes in Some Integer Intervals</a>
%H A337788 Laurențiu Panaitopol, <a href="https://nntdm.net/papers/nntdm-07/NNTDM-07-4-111-114.pdf">Intervals containing prime numbers</a>, NNTDM 7 (2001), 4, pp. 111-114.
%F A337788 a(n) = primepi(n + primepi(n)) - primepi(n)
%F A337788 a(n) = A000720(n + A000720(n)) - A000720(n)
%F A337788 a(n) = A000720(A095117(n)) - A000720(n)
%t A337788 Table[Count[Range[n+1,n+PrimePi[n]],_?PrimeQ],{n,90}] (* _Harvey P. Dale_, Aug 28 2024 *)
%o A337788 (Python)
%o A337788 from sympy import primepi
%o A337788 for n in range(1, 101):
%o A337788     pi = primepi(n)
%o A337788     a = primepi(n + pi) - pi
%o A337788     print(a)
%o A337788 (PARI) a(n) = primepi(n+primepi(n)) - primepi(n); \\ _Michel Marcus_, Oct 27 2020
%Y A337788 Cf. A000720, A095117.
%K A337788 nonn
%O A337788 1,9
%A A337788 _Ya-Ping Lu_, Oct 27 2020