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.

A241487 Primes p such that p+6, p+666 and p+6666 are also prime.

Original entry on oeis.org

7, 53, 67, 157, 191, 311, 331, 347, 353, 373, 443, 563, 571, 641, 821, 823, 857, 941, 1033, 1087, 1123, 1283, 1423, 1607, 1621, 1873, 1997, 2011, 2137, 2333, 2383, 2543, 2657, 2677, 2797, 2957, 3301, 3511, 3607, 3671, 3691, 3797, 3847, 4133, 5113, 5147, 5231
Offset: 1

Views

Author

K. D. Bajpai, Apr 23 2014

Keywords

Comments

The constants in the definition (6, 666 and 6666) are concatenations of the digit 6.

Examples

			a(2) = 53 is a prime: 53+6 = 59, 53+666 = 719 and 53+6666 = 6719 are also prime.
a(3) = 67 is a prime: 67+6 = 73, 67+666 = 733 and 67+6666 = 6733 are also prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a,b,d,e; a:= ithprime(n); b:=a+2;d:=a+222;e:=a+2222; if isprime(b)and isprime(d)and isprime(e)  then return (a) :fi; end: seq(KD(), n=1..5000);
  • Mathematica
    KD = {}; Do[p = Prime[n];If[PrimeQ[p + 6] && PrimeQ[p + 666] && PrimeQ[p + 6666],AppendTo[KD, p]], {n, 5000}]; KD
    (*For the b-file*) c = 0; p = Prime[n]; Do[If[PrimeQ[p + 6] && PrimeQ[p + 666] && PrimeQ[p + 6666], c = c + 1;Print[c, "  ", p]], {n, 1, 2*10^6}];
  • PARI
    s=[]; forprime(p=2, 6000, if(isprime(p+6) && isprime(p+666) && isprime(p+6666), s=concat(s, p))); s \\ Colin Barker, Apr 25 2014