login
Primes p such that p+4 is prime and (p+5)/6 is composite.
0

%I #31 Mar 09 2024 11:00:33

%S 19,43,67,79,103,127,163,193,223,229,307,379,439,457,463,487,499,643,

%T 739,769,823,853,859,877,883,907,967,1009,1087,1093,1213,1279,1297,

%U 1303,1423,1447,1483,1489,1549,1567,1579,1597,1663,1783,1867,1993,1999,2083,2137,2203,2239,2347,2389,2437,2473,2539,2617,2659,2683,2707,2749,2833,2857

%N Primes p such that p+4 is prime and (p+5)/6 is composite.

%p a:=[];

%p for n from 1 to 420 do

%p p:=ithprime(n); p1:=p+4; p2:=(p+5)/6;

%p if isprime(p1) and whattype(p2)=integer and not isprime(p2) then a:=[op(a),p]; fi;

%p od:

%p a; # _N. J. A. Sloane_, Mar 09 2024

%Y Cf. A002808, A000040.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Aug 28 2008

%E Entry corrected by the combined efforts of _Bill McEachen_, _R. J. Mathar_, _Jon E. Schoenfield_, _Alois P. Heinz_, and _N. J. A. Sloane_, Mar 09 2024