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.

A090121 Numbers n such that nextprime(n^3)-prevprime(n^3) = 4.

Original entry on oeis.org

2, 129, 189, 369, 435, 549, 555, 561, 819, 1245, 1491, 1719, 1779, 1839, 1875, 1935, 2175, 2289, 2415, 2451, 2595, 2709, 2769, 3141, 3441, 4401, 4611, 4851, 5655, 5775, 6075, 6099, 6795, 6969, 7125, 7239, 7365, 8109, 8139, 8325, 8361, 8385, 8535, 8685, 9591
Offset: 1

Views

Author

Labos Elemer, Jan 12 2004

Keywords

Examples

			n=129:{p=2146687,n^3=2146689,q=2146691}, q-p=4.
		

Crossrefs

Programs

  • Mathematica
    pre[x_] := Prime[PrimePi[x]] nex[x_] := Prime[PrimePi[x]+1] de[x_] := Prime[PrimePi[x]+1]-Prime[PrimePi[x]] k=3;Do[If[Equal[Prime[PrimePi[n^k]+1]-Prime[PrimePi[n^k]], 4], Print[n]], {n, 2, 100000}]
    lst={};Do[m=n^3;If[PrimeQ[m-2]&&PrimeQ[m+2],AppendTo[lst,n]],{n,0,10^5}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 04 2008 *)
    Select[Range[2,6100],NextPrime[#^3]-NextPrime[#^3,-1]==4&] (* Harvey P. Dale, Sep 17 2017 *)
  • PARI
    is(n)=if(n%2, isprime(n^3-2) && isprime(n^3+2), n==2) \\ Charles R Greathouse IV, Feb 22 2018

Formula

Solutions to A077038(x) = 4.

Extensions

More terms from Harvey P. Dale, Sep 17 2017

A178336 Smaller member of a twin prime pair of the form (k^3 + 2, k^3 + 4).

Original entry on oeis.org

3, 29, 91127, 250049, 328511, 2146691, 47832149, 121287377, 170953877, 194104541, 693154127, 979146659, 1167575879, 1664006627, 5079577961, 6219352721, 8678316377, 10289109377, 10633486601, 13980103931, 17474794877, 28066748321, 28736971049
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 25 2010

Keywords

Examples

			3 = 1^3+2 = prime(2) and 5 = 1^3+4 = prime(3) are a twin prime pair, so 3 becomes the first term.
91127 = 45^3+2 = prime(8811) and 91129 = 45^3+4 = prime(8812) are a twin prime pair, so 91127 is a term.
		

References

  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Band I, B. G. Teubner, Leipzig u. Berlin, 1909

Crossrefs

Programs

  • Mathematica
    Select[Range[3100]^3+2,PrimeQ[#]&&PrimeQ[#+2]&] (* Harvey P. Dale, May 26 2012 *)

Formula

a(n) = A178337(n)^3 + 2.

Extensions

Keyword:base removed, 2 missing terms inserted by R. J. Mathar, Jun 27 2010

A164834 Numbers such that the two adjacent integers are a perfect cube and a prime.

Original entry on oeis.org

2, 28, 126, 728, 3374, 6858, 19682, 24390, 29790, 50652, 91126, 250048, 274626, 300762, 328510, 357912, 571788, 753570, 970298, 1157626, 1295028, 1442898, 1771560, 1860868, 2146688, 2146690, 2460374, 2924208, 3048624, 3442950, 3581578, 4492124, 5000212
Offset: 1

Views

Author

Gaurav Kumar, Aug 28 2009

Keywords

Comments

Subsequence of A163497.

Examples

			2 is a term since 2 has adjacent numbers 1 (cube) and 3 (prime).
28 is a term since 28 has adjacent numbers 27 (cube) and 29 (prime).
728 is a term since 728 has adjacent numbers 727 (prime) and 729 (cube).
		

Crossrefs

Programs

  • Mathematica
    Select[Which[PrimeQ[ #+2],#+1,PrimeQ[ #-2],#-1,True,0]&/@(Range[1000]^3),#!=0&] (* Harvey P. Dale, Sep 29 2009 *)
  • Python
    from sympy import isprime
    def aupto(limit):
      i, c, alst = 1, 1, []
      while c <= limit + 1:
        if isprime(c-2) and c-1 <= limit: alst.append(c-1)
        if isprime(c+2) and c+1 <= limit: alst.append(c+1)
        i += 1
        c = i**3
      return alst
    print(aupto(5000212)) # Michael S. Branicky, Feb 28 2021

Extensions

Edited by Zak Seidov, Aug 30 2009
a(20)-a(30) from Donovan Johnson, Sep 16 2009

A178227 Lesser of a pair (p,p+4) of cousin primes whose arithmetic mean p+2 is a cube.

Original entry on oeis.org

2146687, 6751267, 50243407, 82312873, 165469147, 170953873, 176558479, 549353257, 1929781123, 3314613769, 5079577957, 5630252137, 6219352717, 6591796873, 7245075373, 10289109373, 11993263567, 14084823373, 14724139849, 17474794873, 19880486827, 21230922607, 30988732219
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 23 2010

Keywords

Comments

p = n^3 - 2, p and p+4 are "near(est) cube" primes as n^3 -/+ 1 = (n -/+ 1) * (n^2 +/- n + 1).

Examples

			p = 2146687 is a term, as p + 2 = 129^3 and both p = 129^3 - 2 and p + 4 = 129^3 + 2 are prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2300]^3 - 2, And @@ PrimeQ[# + {0, 4}] &] (* Amiram Eldar, Dec 24 2019 *)
  • PARI
    isok(p) = isprime(p) && (q=nextprime(p+1)) && (q-p==4) && ispower(p+2, 3); \\ Michel Marcus, Nov 27 2016

Formula

a(n) = A178228(n)^3 - 2. - Amiram Eldar, Dec 24 2019

Extensions

Corrected by D. S. McNeil, Nov 24 2010
More terms from Amiram Eldar, Dec 24 2019

A178506 Lesser of a "near cube" twin prime pair (k^3 - 4, k^3 - 2).

Original entry on oeis.org

3371, 8120597, 69426527, 108531329, 176558477, 1207949621, 2379270371, 3477265871, 3560550179, 4227952109, 8012005997, 12665630687, 13060888871, 15832158827, 15945922409, 18337088849, 20279414579, 22354272509, 30283802609, 60559558979, 70496180087, 98035951127
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 29 2010

Keywords

Comments

p + 2 = k^3 - 2 is form of "near(est) cube" prime smaller than cube number k^3, as k^3 - 1 = (k-1) * (k^2 + k + 1), only prime for k=2.

Examples

			p = 3371 = prime(475) = 15^3 - 4, (p, p+2) is twin prime pair tp(90), 3371 is the first term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^4]^3 - 4, And @@ PrimeQ[# + {0, 2}] &] (* Amiram Eldar, Dec 25 2019 *)

Extensions

a(13) corrected and more terms from Amiram Eldar, Dec 25 2019
Showing 1-5 of 5 results.