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.

Showing 1-5 of 5 results.

A182134 Number of primes p such that prime(n) < p < prime(n)^(1 + 1/n).

Original entry on oeis.org

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

Views

Author

Thomas Ordowski, Apr 20 2012

Keywords

Comments

Firoozbakht's conjecture: prime(n+1)^(1/(n+1)) < prime(n)^(1/n), for all n >= 1.
According to Firoozbakht's conjecture, all terms of this sequence are positive. - Jahangeer Kholdi, Jul 30 2014
Conjecture: a(n)=1 only for n = 1, 2, 3, 4, and 8. - Farideh Firoozbakht, Oct 18 2014
See A246782 and A246781 for indices such that a(n)=2 resp. a(n)=3. - M. F. Hasler, Oct 19 2014
Length of n-th row in A244365; a(n) = A001221(A245722(n)). - Reinhard Zumkeller, Nov 18 2014
a(n) = 2 for n = 5, 6, 7, 9, 10, 11, 14, 15, 22, 23, 28, 29, 30, 45, 46, 61, 66, 216, 217, 367, 3793, 1319945, ... = A246782. - Robert G. Wilson v, Feb 20 2015
a(n) = 3 for n = 12, 13, 16, 18, 20, 21, 27, 31, 34, 39, 44, 53, 59, 60, 65, 96, 97, 98, 99, 136, 154, 202, ... = A246781. - Robert G. Wilson v, Feb 20 2015
First occurrence of k: 1, 5, 12, 17, 25, 55, 83, 169, 207, 206, 384, 953, ... = A246810. - Robert G. Wilson v, Feb 20 2015
Conjecture: lim sup n->oo a(n) = oo. - John W. Nicholson, Feb 28 2015
a(n) is unbounded (that is, the above conjecture is true). In particular, there is a constant c > 1 such that a(n) > c log n infinitely often (by Maier's theorem). - Thomas Ordowski and Charles R Greathouse IV, Apr 09 2015

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.
		

Crossrefs

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) = Sum_{m=A000040(n+1)..A249669(n)} A010051(m). - Reinhard Zumkeller, Nov 16 2014
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

A246782 Numbers k such that A182134(k)=2, i.e., there exist only two primes p with prime(k) < p < prime(k)^(1+1/k).

Original entry on oeis.org

5, 6, 7, 9, 10, 11, 14, 15, 22, 23, 28, 29, 30, 45, 46, 61, 66, 216, 217, 367, 3793, 1319945, 1576499, 8040877, 17567976, 44405858, 445538764, 1478061204, 3643075047, 17440041685, 190836014732, 714573709895, 714573709896
Offset: 1

Views

Author

Farideh Firoozbakht, Oct 12 2014

Keywords

Comments

Firoozbakht's conjecture says that for every n, there exists at least one prime p such that prime(n) < p < prime(n)^(1+1/n).
Let A(m) = {n | A182134(n) = m} where A182134(n) = #{p | p is prime and prime(n) < p < prime(n)^(1+1/n)}. This sequence gives the terms of A(2) and the sequence A246781 gives the terms of A(3).
The only known indices n for which A182134(n) = 1 are {1, 2, 3, 4, 8}. It is conjectured that this is the complete set A(1).
Conjecture: For all m, where m is greater than one, A(m) is an infinite set.
a1 = 49749629143524, a2 = 1475067052906944 and a3 = 1475067052906945 are three large terms of the sequence. It is interesting that a3 - a2 = 1.
Conjecture: The sequence is infinite.
Next term is greater than 25000000.
a(34) > 10^12. - Robert Price, Nov 01 2014
The conjecture that A(1)={1, 2, 3, 4, 8} holds through 10^12. - Robert Price, Nov 01 2014

Examples

			5 is in the sequence since there exists only two primes p, prime(5) < p < prime(5)^(1+1/5). Note that prime(5) = 11, 11^(1+1/5) ~ 17.77 and 11 < 13 < 17 < 17.77.
		

Crossrefs

Programs

  • Haskell
    a246782 n = a246782_list !! (n-1)
    a246782_list = filter ((== 2) . a182134) [1..]
    -- Reinhard Zumkeller, Nov 17 2014
  • Mathematica
    np[n_]:=(a = Prime[n]; b = a^(1 + 1/n); Length[Select[Range[a+1,b], PrimeQ]]); Do[If[np[n] == 2,Print[n]], {n, 25000000}]
  • PARI
    for(n=1,oo,2==primepi(prime(n)^(1+1/n))-n&&print1(n", ")) \\ M. F. Hasler, Nov 03 2014
    

Extensions

a(26)-a(27) from Robert Price, Oct 24 2014
a(28)-a(33) from Robert Price, Nov 01 2014

A246810 a(n) is the smallest number m such that np(m) = n, where np(m) is number of primes p such that prime(m) < p < prime(m)^(1 + 1/m).

Original entry on oeis.org

1, 5, 12, 17, 25, 55, 83, 169, 207, 206, 384, 953, 1615, 2192, 2197, 3024, 3023, 10709, 10935, 29509, 29508, 62736, 62735, 94333, 94332, 196966, 314940, 608777, 1258688, 1767259, 2448975, 2448973, 7939362, 9373136, 9373134, 16854966, 16854967
Offset: 1

Views

Author

Keywords

Comments

Firoozbakht's conjecture says that for every n, there exists at least one prime p where, prime(n) < p < prime(n)^(1 + 1/n). Hence if Firoozbakht's conjecture is true, then there is no m such that np(m) = 0.
Conjecture: For every positive integer n, a(n) exists.
a(65) > 10^12. - Robert Price, Nov 12 2014

Examples

			a(6) = 55 since the number of primes p such that prime(55) < p < prime(55)^(1 + 1/55) is 6 and 55 is the smallest number with this property.
		

Crossrefs

Programs

  • Mathematica
    np[n_]:=(b=Prime[n]; Length[Select[Range[b+1, b^(1 + 1/n)],PrimeQ]]); a[n_]:=(For[m=1, np[m] !=n, m++]; m);
    Do[Print[a[n]], {n, 37}]

A249566 Numbers n such that A182134(n) = 4, i.e., there exist exactly four primes p with prime(n) < p < prime(n)^(1+1/n).

Original entry on oeis.org

17, 19, 24, 26, 32, 33, 35, 36, 37, 38, 40, 42, 43, 47, 50, 51, 52, 58, 62, 63, 64, 76, 77, 78, 79, 90, 91, 93, 95, 121, 123, 124, 125, 126, 134, 135, 137, 150, 153, 185, 186, 187, 188, 189, 201, 203, 213, 218, 219, 238, 239, 259, 263, 278, 279, 289, 293
Offset: 1

Views

Author

Robert Price, Nov 01 2014

Keywords

Comments

See A246782 for a more complete description of this sequence.
a(1136) > 10^12.
It is interesting that three consecutive integers n = 20004097201301075, n + 1 and n + 2 are in the sequence. Conjecture: The sequence is infinite. - Farideh Firoozbakht, Nov 01 2014

Crossrefs

Programs

  • Haskell
    a249566 n = a249566_list !! (n-1)
    a249566_list = filter ((== 4) . a182134) [1..]
    -- Reinhard Zumkeller, Nov 17 2014
  • Mathematica
    np[n_]:=(a = Prime[n]; b = a^(1 + 1/n); Length[Select[Range[a+1,b], PrimeQ]]); Do[If[np[n] == 4,Print[n]], {n, 293}]
    np[n_]:=(a = Prime[n]; b = a^(1 + 1/n); Length[Select[Range[a+1,b], PrimeQ]]); Select[Range[293], np[#]==4&] (* Farideh Firoozbakht, Nov 01 2014 *)
  • PARI
    for(n=1,9e9,primepi(prime(n)^(1+1/n))-n==4&&print1(n",")) \\ M. F. Hasler, Nov 03 2014
    

A262061 Least prime(i) such that prime(i)^(1+1/i) - prime(i) > n.

Original entry on oeis.org

2, 3, 5, 7, 11, 11, 17, 17, 23, 29, 29, 37, 41, 53, 59, 67, 79, 89, 97, 127, 127, 137, 163, 179, 211, 223, 251, 293, 307, 337, 373, 419, 479, 521, 541, 587, 691, 727, 797, 853, 929, 1009, 1151, 1201, 1277, 1399, 1523, 1693, 1777, 1931, 2053, 2203, 2333, 2521, 2647, 2953, 3119, 3299, 3527, 3847, 4127
Offset: 1

Views

Author

Keywords

Comments

Where A246778(i) first exceeds n, stated by p_i.
Similar to A245396.
Number of terms < 10^n: 4, 19, 41, 75, 120, 176, 242, 319, 407, 506, ..., .
Concerning Firoozbakht's Conjecture (1982): (prime(n+1))^(1/(n+1)) < prime(n)^(1/n), for all n = 1 or prime(n+1) < prime(n)^(1+1/n), which can be rewritten as: (log(prime(n+1))/log(prime(n)))^n < (1+1/n)^n. This suggests a weaker conjecture: (log(prime(n+1))/log(prime(n)))^n < e.
Prime index of a(n): 1, 1, 3, 4, 5, 5, 7, 7, 9, 10, 10, 12, 13, 16, 17, 19, 22, 24, 25, 31, 31, ..., .
All terms are unique for n > 21. Indices not unique: 1 & 2, 5 & 6, 7 & 8, 10 & 11 and 20 & 21.
The distribution of initial digits, 1...9, for a(n), n<508: 140, 91, 60, 50, 44, 36, 32, 27 and 26.

Examples

			a(20) = 127 since for all primes less than the 31st prime, 127, p_k^(32/31) - p_k are less than 20.
a(100) = 38113,
a(200) = 2400407,
a(300) = 57189007,
a(400) = 828882731,
a(500) = 8748565643,
a(1000) = 91215796479037,
a(1064) = 246842748060263, limit of Mathematica by direct computation, i.e., the first Mathematica line.
		

References

  • Paulo Ribenboim, The little book Of bigger primes, second edition, Springer, 2004, p. 185.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = 2, k = 1}, While[n > p^(1 + 1/k) - p, p = NextPrime@ p; k++]; p]; Array[f, 60] (* or  quicker *)
    (* or quicker *) p = 2; i = 1; lst = {}; Do[ While[ p^(1 + 1/i) < n + p, p = NextPrime@ p; i++]; AppendTo[lst, p]; Print[{n, p}], {n, 100}]; lst
  • PARI
    a(n) = {i = 0; forprime(p=2,, i++; if (p^(1+1/i) - p > n, return (p)););} \\ Michel Marcus, Oct 04 2015

Formula

Log(y) ~= g + x^(1/2) where g = Euler's Gamma.

Extensions

a(2) corrected in b-file by Andrew Howroyd, Feb 22 2018
Showing 1-5 of 5 results.