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-7 of 7 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

A246778 a(n) = floor(prime(n)^(1+1/n)) - prime(n).

Original entry on oeis.org

2, 2, 3, 4, 6, 6, 8, 8, 9, 11, 11, 12, 13, 13, 13, 14, 15, 15, 16, 16, 16, 17, 17, 18, 19, 19, 19, 19, 19, 19, 21, 21, 22, 21, 22, 22, 22, 23, 23, 23, 24, 23, 24, 24, 24, 24, 25, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 28, 29, 29, 28, 28, 29, 30, 30, 30
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 26 2014

Keywords

Comments

The Firoozbakht Conjecture, "prime(n)^(1/n) is a strictly decreasing function of n" is true if and only if a(n) - A001223(n) is nonnegative for all n. The conjecture is true for all primes p where p < 4.0*10^18. (See A. Kourbatov link.)
0, 1, 5, 7, 10 & 20 are not in the sequence. It seems that these six integers are all the nonnegative integers which are not in the sequence.
From Alexei Kourbatov, Nov 27 2015: (Start)
Theorem: if prime(n+1) - prime(n) < prime(n)^(3/4), then every integer > 20 is in this sequence.
Proof: Let f(n) = prime(n)^(1+1/n) - prime(n). Then a(n) = floor(f(n)).
Define F(x) = log^2(x) - log(x) - 1. Using the upper and lower bounds for f(n) established in Theorem 5 of J. Integer Sequences Article 15.11.2; arXiv:1506.03042 we have F(prime(n))-3.83/(log prime(n)) < f(n) < F(prime(n)) for n>10^6; so f(n) is unbounded and asymptotically equal to F(prime(n)).
Therefore, for every n>10^6, jumps in f(n) are less than F'(x)*x^(3/4)+3.83/(log x) at x=prime(n), which is less than 1 as x >= prime(10^6)=15485863. Thus jumps in a(n) cannot be more than 1 when n>10^6. Separately, we verify by direct computation that a(n) takes every value from 21 to 256 when 30 < n <= 10^6. This completes the proof.
(End)

References

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

Crossrefs

Programs

  • Magma
    [Floor(NthPrime(n)^(1+1/n)) - NthPrime(n): n in [1..70]]; // Vincenzo Librandi, Mar 24 2015
    
  • Maple
    N:= 10^4: # to get entries corresponding to all primes <= N
    Primes:= select(isprime, [2,seq(2*i+1,i=1..floor((N-1)/2))]):
    seq(floor(Primes[n]^(1+1/n) - Primes[n]), n=1..nops(Primes)); # Robert Israel, Mar 23 2015
  • Mathematica
    f[n_] := Block[{p = Prime@ n}, Floor[p^(1 + 1/n)] - p]; Array[f, 75]
  • PARI
    first(m)=vector(m,i,floor(prime(i)^(1+1/i)) - prime(i)) \\ Anders Hellström, Sep 06 2015

Formula

a(n) = A249669(n) - A000040(n). - M. F. Hasler, Nov 03 2014
a(n) = (log(prime(n)))^2 - log(prime(n)) + O(1), see arXiv:1506.03042. - Alexei Kourbatov, Sep 06 2015

A246776 a(n) = floor(prime(n)^(1+1/n)) - prime(n+1).

Original entry on oeis.org

1, 0, 1, 0, 4, 2, 6, 4, 3, 9, 5, 8, 11, 9, 7, 8, 13, 9, 12, 14, 10, 13, 11, 10, 15, 17, 15, 17, 15, 5, 17, 15, 20, 11, 20, 16, 16, 19, 17, 17, 22, 13, 22, 20, 22, 12, 13, 22, 24, 22, 20, 24, 16, 21, 21, 21, 25, 21, 23, 25, 17, 14, 25, 27, 24, 14, 23, 20, 28, 26
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 26 2014

Keywords

Comments

The Firoozbakht Conjecture, "prime(n)^(1/n) is a strictly decreasing function of n" is true if and only if a(n) is nonnegative for all n, n>1.
A246777 is a hard subsequence of this sequence.
18 is not in the sequence. It seems that, 18 is the only nonnegative integer which is not in the sequence.

References

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

Crossrefs

Programs

  • Haskell
    a246776 n = a249669 n - a000040 (n + 1)
    -- Reinhard Zumkeller, Nov 16 2014
  • Mathematica
    Table[Floor[Prime[n]^(1+1/n)]-Prime[n+1],{n,70}]

Formula

a(n) = A249669(n) - A000040(n+1). - Reinhard Zumkeller, Nov 16 2014

A059921 a(n) = floor(n^((n+1)/n)).

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75
Offset: 1

Views

Author

Fabian Rothelius, Feb 09 2001

Keywords

Comments

Infinitely many integers are missing, starting 3, 7, 18, 50, 140; their ratios tend to e. - Charles R Greathouse IV, Aug 21 2011

Crossrefs

Cf. A249669.

Programs

  • Mathematica
    Table[Floor[n^((n+1)/n)],{n,80}] (* Harvey P. Dale, Jul 22 2019 *)
  • PARI
    { for (n=1, 1000, write("b059921.txt", n, " ", floor(n^((n + 1)/n))); ) } \\ Harry J. Smith, Jun 30 2009
    
  • PARI
    A059921(n)=n^(1+1/n)\1 \\ M. F. Hasler, Nov 03 2014
    
  • Python
    from sympy import integer_nthroot
    def A059921(n): return integer_nthroot(n**(n+1),n)[0] # Chai Wah Wu, Sep 04 2024

Formula

a(n) = floor(n^(1+1/n)). - M. F. Hasler, Nov 03 2014

A245396 Largest prime not exceeding prime(n)^(1 + 1/n).

Original entry on oeis.org

3, 5, 7, 11, 17, 19, 23, 23, 31, 37, 41, 47, 53, 53, 59, 67, 73, 73, 83, 83, 89, 89, 97, 107, 113, 113, 113, 113, 127, 131, 139, 151, 157, 157, 167, 173, 179, 181, 181, 193, 199, 199, 211, 211, 211, 223, 233, 241, 251, 251, 257, 263, 263, 277, 283, 283, 293, 293, 293, 307, 307, 317, 331, 337
Offset: 1

Views

Author

M. F. Hasler, Nov 03 2014

Keywords

Comments

Firoozbakht's conjecture, prime(n+1) < prime(n)^(1 + 1/n), is equivalent to a(n) > prime(n). See also A182134.
Here prime(n) = A000040(n). The conjecture is also equivalent to a(n) - prime(n) >= A001223(n), the n-th gap between primes. See also A246778(n) = floor(prime(n)^(1 + 1/n)) - prime(n).
It is also conjectured that the equality a(n) - prime(n) = A001223(n) holds only for n in the set {1, 2, 3, 4, 8}, see A246782. a(n) is also largest prime less than prime(n)^(1 + 1/n), since prime(n)^(1 + 1/n) is never prime. - Farideh Firoozbakht, Nov 03 2014
a(n) = A007917(A249669(n)) = A244365(n,A182134(n)) = A006530(A245722(n)). - Reinhard Zumkeller, Nov 18 2014

Crossrefs

Programs

  • Haskell
    a245396 n = a244365 n (a182134 n)  -- Reinhard Zumkeller, Nov 16 2014
  • Maple
    seq(prevprime(ceil(ithprime(n)^(1+1/n))),n=1..100); # Robert Israel, Nov 03 2014
  • Mathematica
    Table[NextPrime[Prime[n]^(1 + 1/n), -1], {n, 64}] (* Farideh Firoozbakht, Nov 03 2014 *)
  • PARI
    a(n)=precprime(prime(n)^(1+1/n))
    
  • PARI
    a(n)=precprime(sqrtnint(prime(n)^(n+1),n)) \\ Charles R Greathouse IV, Oct 29 2018
    

Formula

A245396 = A007917 o A249669, i.e., a(n) = A007917(A249669(n)). Although one could say "less than" in the definition of this sequence, one cannot use A151799 in this formula because for n = 2 and n = 4, one has a(n) = A249669(n).

A244365 Table read by rows: row n contains all primes p such that prime(n) < p <= floor(prime(n)^(1+1/n)).

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 17, 19, 19, 23, 23, 29, 31, 31, 37, 37, 41, 41, 43, 47, 43, 47, 53, 47, 53, 53, 59, 59, 61, 67, 61, 67, 71, 73, 67, 71, 73, 71, 73, 79, 83, 73, 79, 83, 79, 83, 89, 83, 89, 89, 97, 97, 101, 103, 107, 101, 103, 107, 109, 113, 103, 107, 109
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 16 2014

Keywords

Comments

Length of n-th row = A182134(n);
T(n,1) = A000040(n+1); T(n,A182134(n)) = A245396(n).

Examples

			.   n | A182134(n) | A249669(n) |  T(n,1) ... T(n,A182134(n))
. ----+------------+------------+----------------------------
.   1 |          1 |          4 |  [3]
.   2 |          1 |          5 |  [5]
.   3 |          1 |          8 |  [7]
.   4 |          1 |         11 |  [11]
.   5 |          2 |         17 |  [13, 17]
.   6 |          2 |         19 |  [17, 19]
.   7 |          2 |         25 |  [19, 23]
.   8 |          1 |         27 |  [23]
.   9 |          2 |         32 |  [29, 31]
.  10 |          2 |         40 |  [31, 37]
.  11 |          2 |         42 |  [37, 41]
.  12 |          3 |         49 |  [41, 43, 47]
.  13 |          3 |         54 |  [43, 47, 53]
.  14 |          2 |         56 |  [47, 53]
.  15 |          2 |         60 |  [53, 59]
.  16 |          3 |         67 |  [59, 61, 67]
.  17 |          4 |         74 |  [61, 67, 71, 73]
.  18 |          3 |         76 |  [67, 71, 73]
.  19 |          4 |         83 |  [71, 73, 79, 83]
.  20 |          3 |         87 |  [73, 79, 83]
.  21 |          3 |         89 |  [79, 83, 89]
.  22 |          2 |         96 |  [83, 89]
.  23 |          2 |        100 |  [89, 97]
.  24 |          4 |        107 |  [97, 101, 103, 107]
.  25 |          5 |        116 |  [101, 103, 107, 109, 113] .
		

Crossrefs

Cf. A182134 (row lengths), A245722 (row products), A245396, A249669, A010051, A000040.

Programs

  • Haskell
    a244365 n k = a244365_tabf !! (n-1) !! (k-1)
    a244365_row n = a244365_tabf !! (n-1)
    a244365_tabf = zipWith farideh (map (+ 1) a000040_list) a249669_list
                   where farideh u v = filter ((== 1) .  a010051') [u..v]
    
  • PARI
    row(n) = my(list=List(), p=prime(n)); forprime(q=nextprime(p+1), p^(1+1/n), listput(list, q)); Vec(list); \\ Michel Marcus, Jan 24 2022

Formula

T(n,k) = A000040(n+k) for k = 1 .. A182134(n).

A263023 Largest integer k such that prime(n+1) < prime(n)^(1+1/k).

Original entry on oeis.org

1, 2, 4, 4, 14, 9, 25, 15, 13, 50, 19, 35, 77, 42, 32, 37, 122, 43, 72, 153, 54, 88, 63, 52, 113, 235, 121, 252, 130, 40, 156, 108, 339, 71, 375, 128, 134, 210, 144, 151, 466, 96, 504, 256, 523, 90, 96, 304, 618, 313, 214, 657, 134, 233, 240, 247, 755, 255
Offset: 1

Views

Author

Alexei Kourbatov, Oct 08 2015

Keywords

Comments

Firoozbakht's conjecture: prime(n+1) < prime(n)^(1+1/n).
Firoozbakht's conjecture restated for this sequence: a(n) >= n.
I further conjecture that n = 1,2,4 are the only values of n with a(n) = n.
Record values of a(n) occur when prime(n) and prime(n+1) are twin primes.
Upper bound for all n: a(n) < (1/2)*(prime(n)+2)*log(prime(n)).

Examples

			prime(1)=2; a(1)=1 because k=1 is the largest k for which 3 < 2^(1+1/k).
prime(2)=3; a(2)=2 because k=2 is the largest k for which 5 < 3^(1+1/k).
prime(10)=29; a(10)=50 because k=50 is the largest k for which 31 < 29^(1+1/k).
		

References

  • Paulo Ribenboim, The little book of bigger primes, 2nd edition, Springer, 2004, p. 185.

Crossrefs

Programs

  • Magma
    [Floor(Log(NthPrime(n))/(Log(NthPrime(n+1))-Log(NthPrime(n)))): n in [1..60]]; // Vincenzo Librandi, Oct 08 2015
    
  • Mathematica
    Table[Floor[Log@ Prime@ n /(Log@ Prime[n + 1] - Log@ Prime@ n)], {n, 58}] (* Michael De Vlieger, Oct 08 2015 *)
  • PARI
    a(n) = floor(log(prime(n))/(log(prime(n+1)) - log(prime(n)))) \\ Michel Marcus, Oct 10 2015

Formula

a(n) = floor(log(prime(n))/(log(prime(n+1)) - log(prime(n)))).

Extensions

More terms from Vincenzo Librandi, Oct 08 2015
Showing 1-7 of 7 results.