login
Primes p such that all of p - m^2, m = 2, 4, 6, 8, 10, are (positive) primes.
0

%I #13 Sep 16 2019 17:23:58

%S 167,227,677,1217,5843,13163,15683,15923,24107,122267,148403,148727,

%T 157307,186023,198413,227597,229253,313997,338267,344273,360293,

%U 372833,451937,464483,469367,517613,525257,541547,603917,732233,742073,991073,1006253,1196873,1219847,1328927

%N Primes p such that all of p - m^2, m = 2, 4, 6, 8, 10, are (positive) primes.

%C All terms are congruent to (17,23) mod 30.

%p isA247941 := proc(p)

%p local m ;

%p for m from 0 to 10 by 2 do

%p if not isprime(p-m^2) then

%p return false;

%p end if;

%p end do:

%p return true;

%p end proc:

%p for n from 1 to 100000 do

%p p := ithprime(n) ;

%p if isA247941(p) then

%p printf("%d,",p);

%p end if;

%p end do: # _R. J. Mathar_, Sep 28 2014

%t Select[Prime[Range[25,103000]],AllTrue[#-(2Range[5])^2,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Sep 16 2019 *)

%Y Cf. A046132, A246873, A246874 (supersequence).

%K nonn

%O 1,1

%A _Zak Seidov_, Sep 27 2014