A182134 Number of primes p such that prime(n) < p < prime(n)^(1 + 1/n).
1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 3, 3, 2, 2, 3, 4, 3, 4, 3, 3, 2, 2, 4, 5, 4, 3, 2, 2, 2, 3, 4, 4, 3, 4, 4, 4, 4, 3, 4, 5, 4, 4, 3, 2, 2, 4, 5, 5, 4, 4, 4, 3, 5, 6, 5, 5, 4, 3, 3, 2, 4, 4, 4, 3, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 5, 6, 5, 7, 6, 6, 5, 5, 5, 5, 4, 4, 5, 4, 5, 4, 3, 3, 3, 3, 5, 5, 5, 5, 6, 5
Offset: 1
Keywords
Examples
a(25) = 5, because p(25) = 97 and there are 5 primes p such that 97 < p < 97^(1 + 1/25) = 121.9299290...: 101, 103, 107, 109, 113.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Alexei Kourbatov, Verification of the Firoozbakht conjecture for primes up to four quintillion, arXiv:1503.01744 [math.NT], 2015.
- Alexei Kourbatov, Upper Bounds for Prime Gaps Related to Firoozbakht’s Conjecture, arXiv:1506.03042 [math.NT], 2015.
- Alexei Kourbatov, Upper bounds for prime gaps related to Firoozbakht's conjecture, J. Int. Seq. 18 (2015) 15.11.2.
- Wikipedia, Firoozbakht's conjecture
Programs
-
Haskell
a182134 = length . a244365_row -- Reinhard Zumkeller, Nov 16 2014
-
Maple
a:= n-> numtheory[pi](ceil(ithprime(n)^(1+1/n))-1)-n: seq(a(n), n=1..100); # Alois P. Heinz, Apr 21 2012
-
Mathematica
Table[i = Prime[n] + 1; j = Floor[Prime[n]^(1 + 1/n)]; Length[Select[Range[i, j], PrimeQ]], {n, 100}] (* T. D. Noe, Apr 21 2012 *) f[n_] := PrimePi[ Prime[n]^(1 + 1/n)] - n; Array[f, 105] (* Robert G. Wilson v, Feb 20 2015 *)
-
PARI
A182134(n)=primepi(prime(n)^(1+1/n))-n \\ M. F. Hasler, Nov 03 2014
-
Python
from sympy import primepi, prime def a(n): return primepi(prime(n)**(1 + 1/n)) - n # Indranil Ghosh, Apr 23 2017
Formula
a(n) = primepi(prime(n)^(1+1/n)) - n (see PARI program). - John W. Nicholson, Feb 11 2015
Extensions
More terms from Alois P. Heinz, Apr 21 2012
Comments