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.

A060199 Number of primes between n^3 and (n+1)^3.

Original entry on oeis.org

0, 4, 5, 9, 12, 17, 21, 29, 32, 39, 49, 52, 58, 73, 76, 88, 92, 109, 117, 125, 140, 151, 159, 176, 188, 199, 207, 233, 247, 254, 267, 284, 305, 320, 346, 338, 373, 385, 416, 418, 437, 458, 481, 504, 517, 551, 555, 583, 599, 636, 648, 678, 686, 733, 723, 753, 810
Offset: 0

Views

Author

Labos Elemer, Mar 19 2001

Keywords

Comments

Ingham showed that for n large enough and k=5/8, prime(n+1)-prime(n) = O(prime(n)^k). Ingham's result implies that there is a prime between sufficiently large consecutive cubes. Therefore a(n) is nonzero for n sufficiently large. Using the Riemann Hypothesis, Caldwell and Cheng prove there is a prime between all consecutive cubes. The question is undecided for squares. Many authors have reduced the value of k. The best value of k is 21/40, proved by Baker, Harman and Pintz in 2001. - corrected by Jonathan Sondow, May 19 2013
Conjecture: There are always more than 3 primes between two consecutive nonzero cubes. - Cino Hilliard, Jan 05 2003
Dudek (2014), correcting a claim of Cheng, shows that a(n) > 0 for n > exp(exp(33.217)) = 3.06144... * 10^115809481360808. - Charles R Greathouse IV, Jun 27 2014
Cully-Hugill shows the above for n > exp(exp(32.892)) = 6.92619... * 10^83675518094285. - Charles R Greathouse IV, Aug 02 2021
Mossinghoff, Trudgian, & Yang improve this to n > exp(exp(32.76)) = 3.62275 * 10^73328286790528. - Charles R Greathouse IV, Jul 31 2024

Examples

			n = 2: there are 5 primes between 8 and 27, 11,13,17,19,23.
n = 9, n+1 = 10: PrimePi(1000)-PrimePi(729) = 168-129 = a(9) = 39.
		

Crossrefs

First differences of A038098.

Programs

  • Magma
    [0] cat [#PrimesInInterval(n^3, (n+1)^3): n in [1..70]]; // Vincenzo Librandi, Feb 13 2016
    
  • Mathematica
    PrimePi[(#+1)^3]-PrimePi[#^3]&/@Range[0,60] (* Harvey P. Dale, Feb 08 2013 *)
    Last[#]-First[#]&/@Partition[PrimePi[Range[0,60]^3],2,1] (* Harvey P. Dale, Feb 02 2015 *)
  • PARI
    cubespr(n)= for(x=0,n, ct=0; for(y=x^3,(x+1)^3, if(isprime(y), ct++; )); if(ct>=0,print1(ct, ", ")))  \\ Cino Hilliard, Jan 05 2003
    
  • Python
    from sympy import primepi
    def a(n): return primepi((n+1)**3) - primepi(n**3)
    print([a(n) for n in range(57)]) # Michael S. Branicky, Jun 22 2021

Formula

Table[PrimePi[(j+1)^3]-PrimePi[j^3], {j, 1, 100}]

Extensions

Corrected and added more detail to the Ingham references. - T. D. Noe, Sep 23 2008
Combined two comments, correcting a bad error in the first comment. - T. D. Noe, Sep 27 2008
Edited by N. J. A. Sloane, Jan 17 2009 at the suggestion of R. J. Mathar

A077037 Largest prime < n^3.

Original entry on oeis.org

7, 23, 61, 113, 211, 337, 509, 727, 997, 1327, 1723, 2179, 2741, 3373, 4093, 4909, 5827, 6857, 7993, 9257, 10639, 12163, 13807, 15619, 17573, 19681, 21943, 24379, 26993, 29789, 32749, 35933, 39301, 42863, 46649, 50651, 54869, 59281, 63997
Offset: 2

Views

Author

Reinhard Zumkeller, Oct 21 2002

Keywords

Crossrefs

Programs

  • Mathematica
    PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];f[n_]:=n^3;lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 25 2010 *)
    Table[NextPrime[n^3, -1], {n, 2, 40}] (* Robert G. Wilson v, Aug 17 2010 *)
  • PARI
    a(n) = precprime(n^3); \\ Michel Marcus, Jan 14 2023
  • Python
    from sympy import prevprime
    def a(n):  return prevprime(n**3)
    print([a(n) for n in range(2, 41)]) # Michael S. Branicky, Jul 23 2021
    

Formula

a(n) > (n-1)^3 for all large n, by Ingham's theorem (see A060199). - Jonathan Sondow, Mar 27 2014

A077038 Least difference of primes p, q such that p < n^3 < q.

Original entry on oeis.org

4, 6, 6, 14, 12, 10, 12, 6, 12, 34, 10, 24, 8, 16, 6, 10, 12, 6, 16, 20, 12, 34, 22, 10, 6, 6, 18, 12, 18, 14, 22, 18, 12, 36, 14, 20, 8, 52, 10, 10, 16, 38, 34, 6, 40, 24, 10, 16, 12, 14, 8, 18, 20, 30, 20, 32, 18, 34, 40, 48, 10, 6, 8, 18, 10, 18, 18, 30, 30, 30, 42, 20, 6, 44
Offset: 2

Views

Author

Reinhard Zumkeller, Oct 21 2002

Keywords

Comments

Least m such that a(m)=2*n for n=1,2,3,... are: {2,3,14,7,6,5,15,28,21,24,13,...}. - Zak Seidov, May 10 2016
There are numbers k other than 2 such that a(k) = 4. The first few (up to 1000) are 129 189 369 435 549 555 561 819. Conjecture: every even integer greater than 2 occurs infinitely often in this sequence. - Franklin T. Adams-Watters, May 13 2016

Crossrefs

Programs

  • Mathematica
    Table[c=n^3;NextPrime[c]-NextPrime[c,-1],{n,2,80}] (* Harvey P. Dale, Sep 14 2012 *)

Formula

a(n) = A014220(n) - A077037(n).

A173831 Largest prime < n^4.

Original entry on oeis.org

13, 79, 251, 619, 1291, 2399, 4093, 6553, 9973, 14639, 20731, 28559, 38393, 50599, 65521, 83497, 104971, 130307, 159979, 194479, 234239, 279823, 331769, 390581, 456959, 531383, 614639, 707279, 809993, 923513, 1048573, 1185907, 1336333
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];f[n_]:=n^4;lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,5!}];lst
    NextPrime[Range[2,40]^4,-1] (* Harvey P. Dale, May 05 2018 *)

A367265 Numbers k such that there exists i >= 1 such that k divides 3^3^i - 1.

Original entry on oeis.org

1, 2, 13, 26, 109, 218, 433, 757, 866, 1417, 1514, 2834, 3889, 5629, 7778, 8209, 9841, 11258, 16418, 17497, 19682, 34994, 47197, 50557, 52489, 58321, 70957, 82513, 94394, 101114, 104978, 106717, 116642, 141914, 165026, 213434, 227461, 327781, 423901, 454922, 613561, 655562, 682357, 758173, 847802, 894781, 922441
Offset: 1

Views

Author

Jianing Song, Nov 11 2023

Keywords

Comments

Note that 3^3^i - 1 divides 3^3^(i+1) - 1, so this sequence is also numbers k such that k divides 3^3^i - 1 for all sufficiently large i.
Also numbers k such that there exists i >= 1 such that k divides 3^^i - 1, where 3^^i = 3^3^...^3 (i times) = A014220(i-1).
Also numbers k such that ord(3,k) is a power of 3, where ord(a,k) is the multiplicative order of a modulo k: 3^3^i == 1 (mod k) if and only if ord(3,k) divides 3^i, so such i exists if and only if ord(3,k) is a power of 3.
If a term k is not squarefree, then it is divisible by p^2, where p is a Wieferich prime to base 3 (A014127) such that ord(3,p) is a power of 3. No such p is known.

Examples

			Suppose that q is an odd prime power such that ord(3,q) = 3^e. e = 1 gives q = 13; e = 2 gives q = 757; e = 3 gives q = 109, 433, 8209; e = 4 gives q = 3889, 1190701, 12557612956332313.
		

Crossrefs

Cf. A094358 (squarefree divisors of 2^2^i - 1), A357266 (divisors of 3^3^i + 1), A014127.
The subsequence of primes is given by A367648.

Programs

  • PARI
    isA357265(k) = (k%3!=0) && isprimepower(3*znorder(Mod(3,k)))

A367266 Numbers k such that there exists i >= 1 such that k divides 3^3^i + 1.

Original entry on oeis.org

1, 2, 4, 7, 14, 19, 28, 37, 38, 74, 76, 133, 148, 163, 259, 266, 326, 487, 518, 532, 652, 703, 974, 1036, 1141, 1297, 1406, 1459, 1948, 2282, 2594, 2812, 2917, 2918, 3097, 3409, 4564, 4921, 5188, 5834, 5836, 6031, 6194, 6818, 9079, 9253, 9842, 10213, 11668, 12062, 12388, 13636, 18019, 18158, 18506, 19441, 19684, 19927
Offset: 1

Views

Author

Jianing Song, Nov 11 2023

Keywords

Comments

Note that 3^3^i + 1 divides 3^3^(i+1) + 1, so this sequence is also numbers k such that k divides 3^3^i + 1 for all sufficiently large i.
Also numbers k such that there exists i >= 1 such that k divides 3^^i + 1, where 3^^i = 3^3^...^3 (i times) = A014220(i-1).
Write k = 2^{e_0} * Product_{j=1..r} (p_j)^(e_j), then k is a term if and only if e_0 <= 2, and ord(3,(p_j)^(e_j)) is 2 times a power of 3 for every 1 <= j <= r, where ord(a,k) is the multiplicative order of a modulo k: 3^3^i == -1 (mod k) if and only if 3^3^i == -1 (mod 2^{e_0}), and 3^3^i == -1 (mod (p_j)^(e_j)) for every 1 <= j <= r. This is in turn equivalent to e_0 <= 2, and ord(3,(p_j)^(e_j)) being even, and 3^i == ord(3,(p_j)^(e_j))/2 (mod ord(3,(p_j)^(e_j))) for every 1 <= j <= r. As a result, such i exists if and only if e_0 <= 2, and ord(3,(p_j)^(e_j)) is 2 times a power of 3 for every 1 <= j <= r. In other words, each term is a product of a number in {1,2,4} and odd prime powers q such that ord(3,q) is 2 times a power of 3.
If an term k is not squarefree, then it is divisible by p^2, where p is a Wieferich prime to base 3 (A014127) such that ord(3,p) is 2 times a power of 3. No such p is known.

Examples

			Suppose that q is an odd prime power such that ord(3,q) = 2*3^e. e = 1 gives q = 7; e = 2 gives q = 19; e = 3 gives q = 19441 and q = 19927; e = 4 gives q = 163, 1297, 208657, 224209, 5879415781.
		

Crossrefs

Cf. A094358 (squarefree divisors of 2^2^i - 1), A357265 (divisors of 3^3^i - 1), A014127.
The subsequence of primes is given by A367649.

Programs

  • PARI
    isA357266_primepower(q) = if(q%2==0, q%8!=0, my(d); (q%3!=0) && ((d=znorder(Mod(3,q)))%2==0) && isprimepower(3*d/2))
    isA357266(n) = my(f=factor(n)); for(i=1, #f~, if(!isA357266_primepower(f[i,1]^f[i,2]), return(0))); return(1)

A173832 Largest prime < n^5.

Original entry on oeis.org

31, 241, 1021, 3121, 7759, 16787, 32749, 59029, 99991, 161047, 248827, 371291, 537811, 759371, 1048573, 1419839, 1889561, 2476081, 3199997, 4084081, 5153623, 6436327, 7962607, 9765619, 11881357, 14348891, 17210353, 20511143, 24299981
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];f[n_]:=n^5;lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,5!}];lst
    NextPrime[Range[2, 30]^5, -1]  (* Ray Chandler, Dec 08 2018 *)
Showing 1-7 of 7 results.