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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A241488 Primes p such that p+8, p+888 and p+8888 are also prime. 1

%I #11 Jul 31 2017 18:01:42

%S 53,263,389,431,983,1013,1061,1223,1571,1823,2789,3323,3533,3911,4211,

%T 5849,6563,6653,7019,7481,8369,8963,9041,9173,9413,9539,9803,10091,

%U 10559,10979,12611,12689,12911,13163,13751,13781,14243,14879,15083,16691,17231,17483

%N Primes p such that p+8, p+888 and p+8888 are also prime.

%C All the terms in the sequence are congruent to 2 mod 3.

%C The constants in the definition (8, 888 and 8888) are the concatenation of digit 8.

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

%e a(1) = 53 is a prime: 53+8 = 61, 53+888 = 941 and 53+8888 = 8941 are also prime.

%e a(2) = 263 is a prime: 263+8 = 271, 263+888 = 1151 and 263+8888 = 9151 are also prime.

%p KD:= proc() local a,b,d,e; a:= ithprime(n); b:=a+8;d:=a+888;e:=a+8888; 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 + 8] && PrimeQ[p + 888] && PrimeQ[p + 8888], AppendTo[KD, p]], {n, 5000}]; KD

%t (*For the b-file*) c = 0; p = Prime[n]; Do[If[PrimeQ[p + 8] && PrimeQ[p + 888] && PrimeQ[p + 8888], c = c + 1; Print[c, " ", p]], {n, 1, 5*10^6}];

%t Select[Prime[Range[2500]],AllTrue[#+{8,888,8888},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Jul 31 2017 *)

%o (PARI) s=[]; forprime(p=2, 18000, if(isprime(p+8) && isprime(p+888) && isprime(p+8888), 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 | More | 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 April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)