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.

A235871 Primes p such that p+2, p+24 and p+246 are also primes.

Original entry on oeis.org

5, 17, 107, 617, 857, 1277, 1487, 2087, 3167, 3557, 4217, 6947, 7457, 7877, 10067, 12917, 13217, 14387, 15137, 17657, 20897, 21317, 22367, 22697, 27407, 27527, 27917, 28547, 29207, 29387, 30467, 31727, 32117, 33287, 33617, 35507, 36107, 47657, 49367, 49787
Offset: 1

Views

Author

K. D. Bajpai, Apr 21 2014

Keywords

Comments

All the terms in the sequence are congruent to 5 mod 6.
The constants in the definition (2, 24 and 246) are the concatenation of first even digits 2,4 and 6.

Examples

			a(2) = 17 is a prime: 17+2 = 19, 17+24 = 41 and 17+246 = 263 are also prime.
a(3) = 107 is a prime: 107+2 = 119, 107+24 = 131 and 107+246 = 353 are also prime.
		

Crossrefs

Programs

  • Maple
    KD:= proc() local a,b,d,e; a:= ithprime(n); b:=a+2;d:=a+24;e:=a+246; if isprime(b) and isprime(d) and isprime(e) then return (a) :fi; end: seq(KD(), n=1..15000);
  • Mathematica
    KD = {}; Do[p = Prime[n]; If[PrimeQ[p + 2] && PrimeQ[p + 24] && PrimeQ[p + 246], AppendTo[KD, p]], {n, 15000}]; KD
    c = 0; p = Prime[n]; Do[If[PrimeQ[p + 2] && PrimeQ[p + 24] && PrimeQ[p + 246], c = c + 1; Print[c, " ", Prime[n]]], {n, 1, 5000000}];  (* b - file *)
  • PARI
    s=[]; forprime(p=2, 50000, if(isprime(p+2) && isprime(p+24) && isprime(p+246), s=concat(s, p))); s \\ Colin Barker, Apr 21 2014