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-2 of 2 results.

A167833 Three-times-isolated primes: primes p such that neither p+-2, p+-4 nor p+-6 is prime.

Original entry on oeis.org

2, 211, 293, 409, 479, 631, 691, 701, 709, 719, 787, 797, 839, 919, 929, 1163, 1171, 1201, 1249, 1259, 1381, 1399, 1409, 1471, 1511, 1523, 1531, 1637, 1709, 1733, 1801, 1811, 1823, 1831, 1847, 1889, 2039, 2053, 2099, 2153, 2161, 2179, 2221, 2251, 2459
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 13 2009

Keywords

Comments

2 together with prime numbers, isolated from neighboring primes by>6.

Examples

			a(1)=2 (-4,-2,0,4,6,8 are nonprimes); a(2)=211 (205,207,209,213,215,217 are nonprimes).
		

Crossrefs

Programs

  • Mathematica
    Join[{2},Select[Prime[Range[400]],NoneTrue[#+{2,4,6,-2,-4,-6},PrimeQ]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 16 2019 *)

A240699 Primes p such that at least one number among p+-2, p+-4, p+-6 is also a prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281
Offset: 1

Views

Author

Lei Zhou, Apr 10 2014

Keywords

Comments

The union of A167833 and this sequence is the set of all prime numbers, A000040.

Examples

			Prime number 191: the closest prime number to 191 is 193 with 193-191 = 2 <= 6. So 191 is in this sequence.
Prime number 211: the closest prime number to 211 is 199 with 211-199=12 > 6. So 211 is not in this sequence.
		

Crossrefs

Programs

  • Mathematica
    p = 2; Table[While[p = NextPrime[p]; ((NextPrime[p] - p) > 6) && (6 < (p - NextPrime[p, -1]))]; p, {n, 1, 58}]
  • PARI
    forprime(p=3, 250, if(p-precprime(p-1)<7, print1(p, ", "), if(nextprime(p+1)-p<7, print1(p, ", ")))) \\ Felix Fröhlich, Aug 16 2014; corrected by Michel Marcus, May 26 2018
Showing 1-2 of 2 results.