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-10 of 25 results. Next

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

A246785 a(n) is the least m>0 such that A182134(n - m) = m, or zero if there is no such m.

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 2, 1, 0, 2, 2, 2, 0, 3, 2, 2, 0, 3, 0, 3, 0, 3, 2, 2, 0, 0, 4, 0, 2, 2, 2, 0, 3, 0, 4, 3, 0, 4, 4, 4, 3, 0, 4, 0, 4, 2, 2, 0, 0, 4, 0, 5, 4, 4, 3, 0, 0, 5, 0, 5, 3, 2, 0, 0, 4, 4, 2, 0, 0, 0, 5
Offset: 2

Views

Author

Farideh Firoozbakht, Oct 24 2014

Keywords

Comments

Recall that A182134(k) is the number of primes p with prime(k) < p < prime(k)^(1+1/k). The record values up to n = 56000 are the positive integers up to 21 except 13 which first occurs after 14; A246790 gives indices of these record values.

Crossrefs

Programs

  • Haskell
    a246785 n = if null ms then 0 else head ms
                where ms = [m | m <- [1 .. n-1], a182134 (n - m) == m]
    -- Reinhard Zumkeller, Nov 17 2014
  • Mathematica
    h[n_]:= If[n==0, 0, (i=Prime[n]+1; j=Prime[n]^(1+1/n); Length[Select[Range[i,j], PrimeQ]])];a1[n_]:= (For[m=1, m<=n-1 && h[n-m]!= m, m++]; m); a[k_]:= If[c=a1[k]; c==k, 0, c]; Table[a[k],{k,2,90}]

A246781 Numbers n such that A182134(n) = 3, i.e., there exist only three primes p with prime(n) < p < prime(n)^(1 + 1/n).

Original entry on oeis.org

12, 13, 16, 18, 20, 21, 27, 31, 34, 39, 44, 53, 59, 60, 65, 96, 97, 98, 99, 136, 154, 202, 214, 215, 220, 221, 280, 324, 325, 326, 365, 366, 736, 780, 2146, 2225, 3792, 5946, 5947, 5948, 6902, 6903, 18524, 22078, 23510, 23511, 23512, 31542, 31544, 33606
Offset: 1

Views

Author

Farideh Firoozbakht, Oct 12 2014

Keywords

Comments

Firoozbakht's conjecture states that for every n, there exists at least one prime p with prime(n) < p < prime(n)^(1+1/n).
The only known indices n for which A182134(n) = 1 are {1, 2, 3, 4, 8}.
See A246782 for indices n such that A182134(n) = 2.
This sequence lists numbers n such that A182134(n) = 3.

Examples

			12 is in the sequence since there exists only three primes p where, prime(12) < p < prime(12)^(1 + 1/12). Note that prime(12) = 37, 37^(1 + 1/12) ~ 49.99 and 37 < 41 < 43 < 47 < 49.99.
		

Crossrefs

Programs

  • Haskell
    a246781 n = a246781_list !! (n-1)
    a246781_list = filter ((== 3) . a182134) [1..]
    -- Reinhard Zumkeller, Nov 17 2014
  • Maple
    N:= 10^5: # to get all terms where prime(n)^(1+1/n) < N
    Primes:= select(isprime,[2,seq(2*i+1,i=1..floor((N+1)/2))]):
    filter:= proc(n) local t; t:= Primes[n]^(n+1); Primes[n+3]^n <= t and Primes[n+4]^n > t end proc:
    select(filter, [$1..nops(Primes)-4]); # Robert Israel, Mar 23 2015
  • Mathematica
    np[n_] := (a = Prime[n]; b = a^(1 + 1/n); Length[Select[Range[a + 1, b], PrimeQ]]); Select[Range[10000], np[#] == 3 &]

Extensions

a(43)-a(50) from Robert Price, Oct 24 2014

A246793 a(n) is the largest m such that A182134(n - k) = k for A246785(n) <= k <= m, or zero if there is no such m.

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 2, 2, 0, 2, 2, 2, 0, 3, 3, 2, 0, 3, 0, 4, 0, 4, 3, 2, 0, 0, 4, 0, 5, 2, 2, 0, 3, 0, 4, 4, 0, 4, 4, 4, 4, 0, 4, 0, 5, 4, 2, 0, 0, 4, 0, 5, 5, 4, 4, 0, 0, 5, 0, 6, 5, 3, 0, 0, 4, 4, 4, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 0, 5, 0, 6, 0, 0, 7
Offset: 1

Views

Author

Farideh Firoozbakht, Oct 24 2014

Keywords

Comments

Recall that A182134(k) is the number of primes p with prime(k) < p < prime(k)^(1+1/k). Obviously a(n) = 0 if and only if A246785(n) = 0.

Examples

			A182134(217 - k) = k for k = 3, 4, ..., 9 since A246785(217) = 3 and a(217) = 9.
		

Crossrefs

Programs

  • Mathematica
    np[n_]:= If[n==0, 0, (i=Prime[n]+1; j=Prime[n]^(1+1/n); Length[Select[Range[i,j], PrimeQ]])]; a1[n_]:= (For[m=1, m<=n-1&& np[n-m] != m, m++];m);a2[k_]:= If[c=a1[k]; c==k,0,c]; a[n_]:= If[a2[n]==0, 0, For[r=a2[n], np[n-r]==r, r++]; r-1]; Table[a[k], {k,2,90}]

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
    

A246787 Indices of records in A182134.

Original entry on oeis.org

1, 5, 12, 17, 25, 55, 83, 169, 206, 384, 953, 1615, 2192, 2197, 3023, 10709, 10935, 29508, 62735, 94332, 196966, 314940, 608777, 1258688, 1767259, 2448973, 7939362, 9373134, 16854966, 16854967, 32881913, 41084049, 83715318, 90288054, 151449026, 315082003, 327952702, 384935466, 720004431
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

a(n) = A246810(A246786(n)).

Extensions

a(31)-a(39) from Robert Price, Oct 24 2014

A246786 Record values of A182134.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29, 30, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 50, 51, 52, 53, 55, 56, 57, 58, 60, 61, 62, 63, 64
Offset: 1

Views

Author

Keywords

Comments

It seems that a(n+1) <= a(n)+2 for all n.
Also: indices n for which A246810(k) > A246810(n) for all k > n. The missing numbers are {9, 16, 20, 22, 24, 31, 34, ...}, I conjecture that these are exactly the indices for which A246810(n+1) < A246810(n). - M. F. Hasler, Oct 16 2014
Searched A182134(n) through n=10^12. - Robert Price, Nov 01 2014

Crossrefs

Extensions

a(31)-a(39) from Robert Price, Oct 24 2014
a(40)-a(53) from Robert Price, Nov 01 2014

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

Original entry on oeis.org

4, 5, 8, 11, 17, 19, 25, 27, 32, 40, 42, 49, 54, 56, 60, 67, 74, 76, 83, 87, 89, 96, 100, 107, 116, 120, 122, 126, 128, 132, 148, 152, 159, 160, 171, 173, 179, 186, 190, 196, 203, 204, 215, 217, 221, 223, 236, 249, 253, 255, 259, 265, 267, 278, 284, 290, 296, 298, 304, 308, 310, 321
Offset: 1

Views

Author

M. F. Hasler, Nov 03 2014

Keywords

Comments

Firoozbakht's conjecture (prime(n)^(1/n) is a decreasing function), is equivalent to say that prime(n+1) <= a(n). (One has equality for n=2 and n=4.) See also A182134 and A245396.
This is not A059921 o A000040, i.e., a(n) != A059921(prime(n)), since the base is prime(n) but the exponent is n.
A245396(n) = A007917(a(n)). - Reinhard Zumkeller, Nov 16 2014

Crossrefs

Programs

  • Haskell
    a249669 n = floor $ fromIntegral (a000040 n) ** (1 + recip (fromIntegral n))
    -- Reinhard Zumkeller, Nov 16 2014
  • Magma
    [Floor(NthPrime(n)^(1+1/n)): n in [1..70]]; // Vincenzo Librandi, Nov 04 2014
    
  • Maple
    seq(floor(ithprime(n)^(1+1/n)), n=1..100); # Robert Israel, Nov 26 2015
  • PARI
    a(n)=prime(n)^(1+1/n)\1
    

Formula

a(n) = prime(n) + (log(prime(n)))^2 - log(prime(n)) + O(1), see arXiv:1506.03042, Theorem 5. - Alexei Kourbatov, Nov 26 2015

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).
Showing 1-10 of 25 results. Next