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.

A049437 Primes p such that p+2 and p+8 are also primes but p+6 is not.

Original entry on oeis.org

3, 29, 59, 71, 149, 269, 431, 569, 599, 1031, 1061, 1229, 1289, 1319, 1451, 1619, 2129, 2339, 2381, 2549, 2711, 2789, 3299, 3539, 4019, 4049, 4091, 4649, 4721, 5099, 5441, 5519, 5639, 5741, 5849, 6269, 6359, 6569, 6701, 6959, 7211
Offset: 1

Views

Author

Keywords

Comments

p+4 is not prime here except for p=3.

Examples

			p=29 is the smallest prime so that p, p+2 and p+8 are consecutive primes.
		

Crossrefs

Subsequence of A001359. - R. J. Mathar, Feb 10 2013

Programs

  • Magma
    [p: p in PrimesUpTo(8000)| IsPrime(p+2) and IsPrime(p+8) and not IsPrime(p+6) ] // Vincenzo Librandi, Jan 28 2011
    
  • Maple
    select(p -> isprime(p) and isprime(p+2) and isprime(p+8) and not isprime(p+6), [3, seq(i,i=5..10000, 6)]); # Robert Israel, Nov 20 2017
  • Mathematica
    {3}~Join~Select[Partition[Prime@ Range[10^3], 3, 1], Differences@ # == {2, 6} &][[All, 1]] (* Michael De Vlieger, Nov 20 2017 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if(isprime(p+2) && isprime(p+8) && !isprime(p+6), print1(p, ", "))) \\ Iain Fox, Nov 20 2017