login
Primes p with property that there exists a number d>0 such that numbers p-k*d, k=1...4, are four primes.
7

%I #7 Sep 10 2014 12:23:10

%S 29,53,127,131,157,173,197,227,251,257,271,283,293,311,353,373,389,

%T 397,421,443,449,463,479,509,521,587,607,613,617,661,673,677,691,719,

%U 757,761,811,821,823,839,853,859,863,881,887,907,911,941,953,967,983,997,1013

%N Primes p with property that there exists a number d>0 such that numbers p-k*d, k=1...4, are four primes.

%C Conjecture: only 653 primes are not in the sequence: 2, 3, ..., 100291.

%e 29 is in the sequence because with d=6: 23, 17, 11, 5 are all primes.

%t prms = 4; fQ[p_] := Module[{d = 1}, While[prms*d < p && Union[PrimeQ[p - Range[prms]*d]] != {True}, d++]; prms*d < p]; Select[Prime[Range[2, PrimePi[1013]]], fQ] (* _T. D. Noe_, Sep 08 2012 *)

%o (PARI) is(n)=my(t); forprime(p=2,n-12,if((n-p)%4==0 && isprime((t=(n-p)/4)+p) && isprime(2*t+p) && isprime(3*t+p) && isprime(n), return(1))); 0 \\ _Charles R Greathouse IV_, Sep 10 2014

%Y Cf. A216495, A094383, A216498, A216468.

%K nonn

%O 1,1

%A _Alex Ratushnyak_, Sep 08 2012