login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #13 Apr 23 2014 16:07:28

%S 5,17,107,617,857,1277,1487,2087,3167,3557,4217,6947,7457,7877,10067,

%T 12917,13217,14387,15137,17657,20897,21317,22367,22697,27407,27527,

%U 27917,28547,29207,29387,30467,31727,32117,33287,33617,35507,36107,47657,49367,49787

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

%C All the terms in the sequence are congruent to 5 mod 6.

%C The constants in the definition (2, 24 and 246) are the concatenation of first even digits 2,4 and 6.

%H K. D. Bajpai, <a href="/A235871/b235871.txt">Table of n, a(n) for n = 1..5178</a>

%e a(2) = 17 is a prime: 17+2 = 19, 17+24 = 41 and 17+246 = 263 are also prime.

%e a(3) = 107 is a prime: 107+2 = 119, 107+24 = 131 and 107+246 = 353 are also prime.

%p 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);

%t KD = {}; Do[p = Prime[n]; If[PrimeQ[p + 2] && PrimeQ[p + 24] && PrimeQ[p + 246], AppendTo[KD, p]], {n, 15000}]; KD

%t 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 *)

%o (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

%Y Cf. A000040, A023200, A046136, A230223, A237890.

%K nonn

%O 1,1

%A _K. D. Bajpai_, Apr 21 2014