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.

A105413 Primes p = prime(k) such that both p+2 and prime(k+6)-2 are prime numbers.

Original entry on oeis.org

3, 11, 107, 239, 311, 569, 1019, 1031, 1229, 1427, 1997, 2081, 2087, 2111, 2687, 3251, 4049, 4127, 4157, 4229, 4241, 4481, 5231, 5639, 6089, 7307, 7559, 8969, 9629, 10007, 10457, 13691, 13829, 13901, 14249, 14549, 14561, 16187, 16649, 17207
Offset: 1

Views

Author

Cino Hilliard, May 02 2005

Keywords

Comments

Conjecture: There are infinitely many primes p(k) such that p(k)+2 and p(k+m)-2 are both primes for all m > 1.

Examples

			prime(5) = 11, and both prime(5)+2 = 13 and prime(5+6)-2 = 29 are primes, so 11 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..2000] | IsPrime(NthPrime(n)+2) and IsPrime(NthPrime(n+6)-2)]; // Vincenzo Librandi, Sep 14 2015
  • Mathematica
    For[n = 1, n < 500, n++, If[PrimeQ[Prime[n] + 2], If[PrimeQ[Prime[n + 6] - 2], Print[Prime[n]]]]] (* Stefan Steinerberger, Feb 07 2006 *)
    Transpose[Select[Partition[Prime[Range[2000]],7,1],#[[2]]-#[[1]] == #[[7]]- #[[6]] == 2&]][[1]] (* Harvey P. Dale, Oct 08 2014 *)
  • PARI
    pnpk(n, m=6, k=2) = { local(x, v1, v2); for(x=1, n, v1 = prime(x)+ k; v2 = prime(x+m)-k; if(isprime(v1)&isprime(v2), print1(prime(x), ", ") ) ) ;} \\ corrected by Michel Marcus, Sep 14 2015
    
  • PARI
    lista(pmax) = {my(k = 1, p = primes(7)); forprime(p1 = p[#p], pmax, k++; p[#p] = p1; if(p[2]- p[1] == 2 && p[7] - p[6] == 2, print1(p[1], ", ")); for(i = 1, #p-1, p[i] = p[i+1]));} \\ Amiram Eldar, Oct 04 2024
    

A105410 Numbers k such that prime(k)-2 and prime(k+3)-2 are both primes.

Original entry on oeis.org

3, 8, 11, 18, 50, 58, 114, 174, 207, 210, 213, 254, 263, 266, 316, 321, 344, 396, 406, 461, 493, 496, 499, 543, 556, 582, 614, 626, 644, 724, 727, 741, 847, 932, 1099, 1102, 1118, 1121, 1233, 1236, 1261, 1285, 1443, 1616, 1619, 1640, 1705, 1710, 1783, 1792
Offset: 1

Views

Author

Cino Hilliard, May 02 2005

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2000],PrimeQ[Prime[#]-2]&&PrimeQ[Prime[#+3]-2]&] (* Harvey P. Dale, Jun 02 2011 *)
  • PARI
    pnpk(n, m=3, k=2) = { local(x, v1, v2); for(x=1, n, v1 = prime(x)-k; v2 = prime(x+m)-k; if(isprime(v1)&isprime(v2), print1(x, ", ") ) ) ; } \\ corrected by Amiram Eldar, Oct 04 2024
    
  • PARI
    lista(pmax) = {my(k = 1, p = primes(5)); forprime(p1 = p[#p], pmax, k++; p[#p] = p1; if(p[2]- p[1] == 2 && p[5] - p[4] == 2, print1(k, ", ")); for(i = 1, #p-1, p[i] = p[i+1]));} \\ Amiram Eldar, Oct 04 2024

Extensions

Offset corrected by Amiram Eldar, Oct 04 2024

A105411 Primes p = prime(k) such that both p+2 and prime(k+4)-2 are prime numbers.

Original entry on oeis.org

3, 17, 29, 59, 227, 269, 617, 1031, 1277, 1289, 1301, 1607, 1667, 1697, 2087, 2129, 2309, 2711, 2789, 3257, 3527, 3539, 3557, 3917, 4019, 4241, 4517, 4637, 4787, 5477, 5501, 5639, 6551, 7307, 8819, 8837, 8999, 9011, 10037, 10067, 10271, 10499, 12041
Offset: 1

Views

Author

Cino Hilliard, May 02 2005

Keywords

Comments

Essentially the same as A089629. - R. J. Mathar, Aug 28 2008

Examples

			prime(7) = 17, and both prime(7)+2 = 19 and prime(7+4)-2 = 29 are primes, so 17 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..1500] | IsPrime(NthPrime(n)+2) and IsPrime(NthPrime(n+4)-2)]; // Vincenzo Librandi, Sep 14 2015
  • Mathematica
    For[n = 1, n < 500, n++, If[PrimeQ[Prime[n] + 2],If[PrimeQ[Prime[n + 4] - 2], Print[Prime[n]]]]] (* Stefan Steinerberger, Feb 07 2006 *)
    Select[Partition[Prime[Range[1500]],5,1],AllTrue[{#[[1]]+2,#[[5]]-2},PrimeQ]&][[All,1]] (* Harvey P. Dale, Oct 28 2022 *)
  • PARI
    pnpk(n, m=4, k=2) = { local(x, v1, v2); for(x=1, n, v1 = prime(x)+ k; v2 = prime(x+m)-k; if(isprime(v1)&isprime(v2), print1(prime(x), ", ") ) ) ;} \\ corrected by Michel Marcus, Sep 14 2015
    
  • PARI
    lista(pmax) = {my(k = 1, p = primes(5)); forprime(p1 = p[#p], pmax, k++; p[#p] = p1; if(p[2]- p[1] == 2 && p[5] - p[4] == 2, print1(p[1], ", ")); for(i = 1, #p-1, p[i] = p[i+1]));} \\ Amiram Eldar, Oct 04 2024
    

Formula

a(n) = prime(A105410(n)-1). - Amiram Eldar, Oct 04 2024

A105412 Primes p = prime(k) such that both p+2 and prime(k+5)-2 are prime numbers.

Original entry on oeis.org

5, 41, 179, 197, 281, 599, 641, 809, 827, 857, 1061, 1451, 2237, 2549, 3119, 3329, 3359, 3821, 4001, 4091, 4217, 5417, 5441, 5849, 6269, 6659, 6761, 6791, 7457, 7949, 8387, 8597, 9239, 9419, 9431, 9677, 10301, 10427, 10859, 10889, 11117, 11717
Offset: 1

Views

Author

Cino Hilliard, May 02 2005

Keywords

Comments

Conjecture: There are infinitely many primes p(k) such that p(k)+2 and p(k+m)-2 are both primes for all m > 1.

Examples

			prime(13) = 41, and both prime(13)+2 = 43 and prime(13+5)-2 = 59 are primes, so 41 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..1500] | IsPrime(NthPrime(n)+2) and IsPrime(NthPrime(n+5)-2)]; // Vincenzo Librandi, Sep 14 2015
  • Mathematica
    For[n = 1, n < 500, n++, If[PrimeQ[Prime[n] + 2], If[PrimeQ[Prime[n + 5] - 2], Print[Prime[n]]]]] (* Stefan Steinerberger, Feb 07 2006 *)
  • PARI
    pnpk(n, m=5, k=2) = { local(x, v1, v2); for(x=1, n, v1 = prime(x)+ k; v2 = prime(x+m)-k; if(isprime(v1)&isprime(v2), print1(prime(x), ", ") ) ) ;} \\ corrected by Michel Marcus, Sep 14 2015
    
  • PARI
    lista(pmax) = {my(k = 1, p = primes(6)); forprime(p1 = p[#p], pmax, k++; p[#p] = p1; if(p[2]- p[1] == 2 && p[6] - p[5] == 2, print1(p[1], ", ")); for(i = 1, #p-1, p[i] = p[i+1]));} \\ Amiram Eldar, Oct 04 2024
    

A105414 Primes p = prime(k) such that p+2 and prime(k+7)-2 are both prime numbers.

Original entry on oeis.org

17, 71, 149, 191, 431, 521, 821, 1049, 1277, 1289, 1451, 1619, 1667, 1877, 1949, 2027, 2657, 3299, 3329, 3467, 3527, 3539, 3767, 3929, 4271, 4931, 5477, 5849, 6131, 6659, 6701, 6779, 6827, 8537, 8819, 8999, 9419, 9719, 9929, 10037, 10091, 11069, 11117
Offset: 1

Views

Author

Cino Hilliard, May 02 2005

Keywords

Comments

Conjecture: There are infinitely many primes p(k) such that p(k)-2 and p(k+m)-2 are both primes for all m > 1.

Examples

			p(8)-2 = 17, p(8+6)-2 = 41, both prime, 17 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    For[n = 1, n < 500, n++, If[PrimeQ[Prime[n] + 2], If[PrimeQ[Prime[n + 7] - 2], Print[Prime[n]]]]] (* Stefan Steinerberger, Feb 07 2006 *)
    Select[Prime[Range[1500]],AllTrue[{#+2,Prime[PrimePi[#]+7]-2},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 05 2019 *)
  • PARI
    pnpk(n, m=7, k=2) = { local(x, v1, v2); for(x=1, n, v1 = prime(x)+k; v2 = prime(x+m)-k; if(isprime(v1)&isprime(v2), print1(v1-k, ", ") ) ) ; } \\ corrected by Amiram Eldar, Oct 04 2024
    
  • PARI
    lista(pmax) = {my(k = 1, p = primes(8)); forprime(p1 = p[#p], pmax, k++; p[#p] = p1; if(p[2]- p[1] == 2 && p[8] - p[7] == 2, print1(p[1], ", ")); for(i = 1, #p-1, p[i] = p[i+1]));} \\ Amiram Eldar, Oct 04 2024
Showing 1-5 of 5 results.