login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


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

%I #9 Apr 25 2014 16:49:06

%S 7,53,67,157,191,311,331,347,353,373,443,563,571,641,821,823,857,941,

%T 1033,1087,1123,1283,1423,1607,1621,1873,1997,2011,2137,2333,2383,

%U 2543,2657,2677,2797,2957,3301,3511,3607,3671,3691,3797,3847,4133,5113,5147,5231

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

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

%H K. D. Bajpai, <a href="/A241487/b241487.txt">Table of n, a(n) for n = 1..10000</a>

%e a(2) = 53 is a prime: 53+6 = 59, 53+666 = 719 and 53+6666 = 6719 are also prime.

%e a(3) = 67 is a prime: 67+6 = 73, 67+666 = 733 and 67+6666 = 6733 are also prime.

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

%t KD = {}; Do[p = Prime[n];If[PrimeQ[p + 6] && PrimeQ[p + 666] && PrimeQ[p + 6666],AppendTo[KD, p]], {n, 5000}]; KD

%t (*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}];

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

%Y Cf. A000040, A023200, A046136, A230223, A236302, A236304, A237890, A241485.

%K nonn

%O 1,1

%A _K. D. Bajpai_, Apr 23 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 23:16 EDT 2024. Contains 376078 sequences. (Running on oeis4.)