editing
approved
editing
approved
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 *)
approved
editing
editing
approved
reviewed
approved
proposed
reviewed
editing
proposed
Primes p such that all of p - m^2, m = 2, 4, 6, 8, 10, are all (positive) primes.
isA247941 := proc(p)
local m ;
for m from 0 to 10 by 2 do
if not isprime(p-m^2) then
return false;
end if;
end do:
return true;
end proc:
for n from 1 to 100000 do
p := ithprime(n) ;
if isA247941(p) then
printf("%d, ", p);
end if;
end do: # R. J. Mathar, Sep 28 2014
proposed
editing
editing
proposed
All terms are congruent to 5 (17,23) mod 630.