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.

A048637 Primes p such that p^3 + 2 is also prime.

Original entry on oeis.org

3, 5, 29, 71, 83, 113, 173, 263, 311, 419, 431, 491, 503, 509, 683, 701, 761, 773, 839, 911, 953, 1031, 1091, 1103, 1151, 1193, 1259, 1283, 1373, 1451, 1523, 1583, 1601, 1733, 1823, 1889, 1931, 2099, 2153, 2213, 2273, 2339, 2351, 2441, 2531, 2543, 2609
Offset: 1

Views

Author

Keywords

Examples

			3 is a term since 3^3 + 2 = 29 is prime.
		

Crossrefs

Cf. A048636.

Programs

  • Magma
    [p: p in PrimesUpTo(3000) | IsPrime(p^3+2)]; // Vincenzo Librandi, Apr 11 2013
    
  • Mathematica
    Prime[ Select[ Range[ 500], PrimeQ[Prime[ # ]^3 + 2] &] ]
    Select[Prime[Range[400]], PrimeQ[#^3 + 2]&] (* Vincenzo Librandi, Apr 11 2013 *)
  • PARI
    forprime(p=2,3000,if(isprime(p^3+2),print1(p,", "))) \\ Hugo Pfoertner, Oct 30 2018

Extensions

More terms from Robert G. Wilson v, Dec 04 2000

A189827 a(n) = d(n-1) + d(n+1), where d(k) is the number of divisors of k.

Original entry on oeis.org

3, 5, 4, 7, 4, 8, 5, 8, 5, 10, 4, 10, 6, 9, 6, 11, 4, 12, 6, 10, 6, 12, 5, 12, 7, 10, 6, 14, 4, 14, 6, 10, 8, 13, 6, 13, 6, 12, 6, 16, 4, 14, 8, 10, 8, 14, 5, 16, 7, 12, 6, 14, 6, 16, 8, 12, 6, 16, 4, 16, 8, 11, 10, 15, 6, 14, 6, 14, 6, 20, 4, 16, 8, 10, 10
Offset: 2

Views

Author

T. D. Noe, Apr 28 2011

Keywords

Comments

d(n-1) + d(n+1) is a measure of the compositeness of the numbers next to n. Sequence A189825 lists the first occurrence of each number.
It is conjectured that every number greater than 3 occurs an infinite number of times. Note that an infinite number of 4's is equivalent to there being an infinite number of twin primes (A001097). An infinite number of 5's is equivalent to there being an infinite number of primes of the form p^2-2 (A028871) or p^2+2 (A056899) for prime p. An infinite number of 6's is equivalent to there being an infinite number of primes of the form p^3-2 (A066878), p^3+2 (A048636), p*q-2 (A063637), or p*q+2 (A063638), where p and q are distinct primes.

Examples

			a(5) = d(4) + d(6) = 3 + 4 = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[0,n-1] + DivisorSigma[0,n+1], {n, 2, 100}]
    First[#]+Last[#]&/@Partition[DivisorSigma[0,Range[80]],3,1] (* Harvey P. Dale, May 27 2013 *)

A132282 Near-cube primes: primes of the form p^3 + 2, where p is noncomposite.

Original entry on oeis.org

2, 3, 29, 127, 24391, 357913, 571789, 1442899, 5177719, 18191449, 30080233, 73560061, 80062993, 118370773, 127263529, 131872231, 318611989, 344472103, 440711083, 461889919, 590589721, 756058033, 865523179, 1095912793
Offset: 1

Views

Author

Jonathan Vos Post, Aug 16 2007

Keywords

Comments

The corresponding near-cube prime indices q are A132281. Analog of near-square primes. After a(1) = 2, all values must be odd. Numbers of the form n^2+2 for n=1, 2, ... are 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, ... (A059100). These are prime for indices n = 1, 3, 9, 15, 21, 33, 39, 45, 57, 81, 99, ... (A067201), corresponding to the near-square primes 3, 11, 83, 227, 443, 1091, 1523, 2027, ... (A056899). Helfgott proves with minor conditions that: "Let f be a cubic polynomial. Then there are infinitely many primes p such that f(p) is squarefree." Note that 47^3 + 2 = 103825 = 5^2 * 4153 and similarly 97^3 + 2 is divisible by 5^2, but otherwise an infinite number of p^3+2 are squarefree.

Examples

			a(1) = 0^3 + 2 = 2 is prime and 0 is noncomposite.
a(2) = 1^3 + 2 = 3 is prime and 1 is noncomposite.
a(3) = 3^3 + 2 = 29 is prime and 3 is prime.
a(4) = 5^3 + 2 = 127 is prime and 5 is prime.
a(5) = 29^3 + 2 = 24391 is prime and 29 is prime.
45^3 + 2 = 91127 is prime, but not in this sequence because 45 is not prime.
63^3 + 2 = 250049 is prime, but not in this sequence because 63 is not prime.
a(6) = 71^3 + 2 = 357913 is prime.
a(7) = 83^3 + 2 = 571789 is prime.
a(8) = 113^3 + 2 = 1442899 is prime.
		

Crossrefs

Programs

  • Mathematica
    Join[{2, 5}, Select[Prime[Range[200]]^3 + 2, PrimeQ[ # ] &]] (* Stefan Steinerberger, Aug 17 2007 *)
  • PARI
    v=[2,3]; forprime(p=3, 1e4, if(isprime(t=p^3+2), v=concat(v, t))); t \\ Charles R Greathouse IV, Feb 14 2011

Formula

a(n) = A132281(n)^3 + 2. {p in A000040 such that for some q = 0, 1, or q in A000040, we have p = A067200(q) = A084380(q) = q^3 + 2 is in A000040}.
a(n) = A048636(n-2) for n >= 3. - Georg Fischer, Nov 03 2018

Extensions

More terms from Stefan Steinerberger, Aug 17 2007
a(2) corrected by Charles R Greathouse IV, Feb 14 2011

A188764 Primes p such that all prime factors of p-2 have exponent 3.

Original entry on oeis.org

3, 29, 127, 24391, 274627, 328511, 357913, 571789, 1157627, 1442899, 1860869, 2146691, 2924209, 5177719, 9129331, 9938377, 10503461, 12326393, 15438251, 18191449, 24642173, 26730901, 28372627, 30080233, 39651823
Offset: 1

Views

Author

Keywords

Comments

A048636 is the subsequence of terms where there is only one prime divisor of p-2. - M. F. Hasler, Jan 13 2025

Examples

			30080233-2 = 311^3, 39651823-2 = 11^3*31^3, ...
3-2 = 1 has no prime factors, so is trivially a member.
		

Crossrefs

Subsequence of A144953; A048636 is a subsequence.

Programs

  • Mathematica
    Prepend[Select[Table[Prime[n],{n,3000000}],Length[Union[Last/@FactorInteger[#-2]]]==1&&Union[Last/@FactorInteger[#-2]]=={3}&], 3]
    Prepend[Select[Prime[Range[25*10^5]],Union[FactorInteger[#-2][[All,2]]]=={3}&], 3] (* Harvey P. Dale, Nov 22 2018 *)
    seq[lim_] := Select[Select[Range[Floor[Surd[lim-2, 3]]], SquareFreeQ]^3 + 2, PrimeQ]; seq[4*10^7] (* Amiram Eldar, Jan 18 2025 *)
  • PARI
    list(lim)=my(v=List()); forsquarefree(k=1,sqrtnint(lim\1-2,3), my(p=k[1]^3+2); if(isprime(p), listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Jan 14 2025

Formula

a(n) >> n^3. - Charles R Greathouse IV, Jan 14 2025

Extensions

a(1) = 3 inserted by Charles R Greathouse IV, Jan 14 2025

A321891 Prime numbers of the form p^3 + q, where p and q are primes.

Original entry on oeis.org

11, 13, 19, 29, 31, 37, 61, 67, 79, 97, 109, 127, 139, 157, 181, 199, 241, 271, 277, 367, 397, 409, 439, 457, 487, 499, 571, 577, 601, 607, 661, 691, 709, 727, 751, 769, 829, 919, 937, 991, 1021, 1039, 1069, 1117, 1171, 1201, 1231, 1237, 1291, 1297, 1327, 1381
Offset: 1

Views

Author

Pierandrea Formusa, Nov 20 2018

Keywords

Comments

For reasons of parity, either p or q must be equal to 2, so this actually is the union of (mostly) "primes of the form p + 8" (A092402) and (rarely) "primes of the form p^3 + 2" (A048636 = 29, 127, 24391, 357913, ...). - M. F. Hasler, Jan 13 2025
Except for 13, these primes are the minimum or maximum prime numbers of the respective decade. - Davide Rotondo, Jan 31 2025

Examples

			37 is prime and 37 = 2^3 + 29, where 2 and 29 are primes, therefore 37 is a term.
		

Crossrefs

Union of A048636 and A092402. - Michel Marcus, Nov 21 2018

Programs

  • Maple
    N:= 2000: # to get terms <= N
    A1:= select(t -> isprime(t) and isprime(t-8), {11,seq(i,i=13 ..N,6)}):
    v:= floor((N-2)^(1/3)):
    B:= select(t -> isprime(t) and isprime(t^3+2), {3,seq(i,i=5..v,6)}):
    sort(convert(A1 union map(t -> t^3+2,B), list)); # Robert Israel, Mar 05 2020
  • Mathematica
    nmax=4; Select[Union[Prime[Range[nmax]]^3 + 2, Prime[Range[Prime[nmax]^3]] + 8], PrimeQ] (* Amiram Eldar, Nov 21 2018 *)
  • MiniZinc
    include "globals.mzn";
    int: n = 2;
    int: max_val = 1200000;
    array[1..n+1] of var 2..max_val: x;
    % primes between 2..max_valset of int:
    prime = 2..max_val diff { i | i in 2..max_val, j in 2..ceil(sqrt(i)) where i mod j = 0} ;
    set of int: primes; primes = prime union {2};
    solve satisfy;
    constraint all_different(x) /\ x[1] in primes /\ x[2] in primes /\ x[3] in primes /\
    pow(x[1], 3)+pow(x[2], 1)= x[3] ;
    output [ show(x)]
    
  • PARI
    list(lim)=my(v=List()); forprime(p=3,sqrtnint((lim\=1)-2,3), if(isprime(p^3+2), listput(v,p^3+2))); forprime(p=11,lim+8, if(isprime(p-8), listput(v,p))); Set(v) \\ Charles R Greathouse IV, Jan 13 2025
    
  • PARI
    select( {is_A321891(n)=isprime(n)&& (isprime(n-8)|| (ispower(n-2, 3, &n)&&isprime(n)))}, [1..1234]) \\ M. F. Hasler, Jan 13 2025

Extensions

More terms from Amiram Eldar, Nov 21 2018

A242281 Smaller member of a Sophie Germain pair in which each member of the pair is the smaller of its prime pair (p, (p*p*p)+2).

Original entry on oeis.org

419, 761, 911, 1601, 2351, 6269, 6551, 9029, 22259, 28559, 28949, 37139, 52571, 56531, 67559, 70379, 78509, 108359, 114641, 133571, 135119, 138179, 146669, 153449, 176021, 187409, 193841, 200639, 252761, 288731, 303581, 312551, 333479, 337349, 407639, 408389
Offset: 1

Views

Author

Abhiram R Devesh, May 10 2014

Keywords

Examples

			a(1): p = 419; 2*p+1 = 839; prime pairs: (419, 73560061) and (839, 590589721).
a(2): p = 761; 2*p+1 = 1523; prime pairs: (761, 440711083) and (1523, 3532642669).
		

Crossrefs

Programs

  • Python
    from sympy import primerange, isprime
    def f(p): return p * p * p + 2
    def ok(p): return isprime(2*p+1) and isprime(f(p)) and isprime(f(2*p+1))
    print(list(filter(ok, primerange(1_000_000)))) # David Radcliffe, Jun 24 2025

A242346 Smaller member of a Sophie Germain pair in which each member of the pair is the smallest of its prime triple (p, (p^3)+2, (p^5)+2).

Original entry on oeis.org

8629739, 77115359, 173508869, 343621919, 419597309, 573556349, 763154039, 770676239, 847344419, 851521949, 951418229, 1014432869, 1252780829, 1260053939, 1322933519, 1529921909, 1569236309, 1861760819, 1954231199, 2048205689, 2071334939, 2583377789, 2658083819
Offset: 1

Views

Author

Abhiram R Devesh, May 11 2014

Keywords

Comments

Terms are congruent to -1 mod 30. - David Radcliffe, Aug 14 2025

Examples

			a(1): p = 8629739; (2*p)+1 = 17259479
Prime Triplets of the form (p,(p^3)+2,(p^5)+2): (8629739, 642677333350934910421, 47861720360612147562343307996312701 );(17259479, 5141419560476273559241, 1531575495230651978949727458917513401)
		

Crossrefs

Programs

  • Python
    # See b-file.
Showing 1-7 of 7 results.