%I #25 Mar 17 2022 13:51:35
%S 169,221,247,289,323,361,403,481,527,559,589,629,703,731,793,817,871,
%T 923,949,961,1027,1037,1139,1147,1159,1207,1241,1261,1273,1313,1333,
%U 1339,1343,1349,1369,1387,1417,1501,1591,1649,1651,1717,1751,1781,1807,1843,1849,1853
%N Composite numbers that have no Sophie Germain prime and no "safe prime" factors.
%C Prime factors of the terms have to be in A059500.
%H Karl-Heinz Hofmann, <a href="/A350705/b350705.txt">Table of n, a(n) for n = 1..10000</a>
%e a(2) = 221 = 13 * 17 and {13, 17} are neither in A005384 nor in A005385, but they are in A059500.
%t Select[Range[2000], CompositeQ[#] && AllTrue[FactorInteger[#][[;; , 1]], ! PrimeQ[2*#1 + 1] && ! PrimeQ[(#1 - 1)/2] &] &] (* _Amiram Eldar_, Feb 15 2022 *)
%o (Python)
%o from sympy import primefactors, isprime
%o print([n for n in range(2,1854) if not isprime(n) and all(not isprime(p*2+1) and not isprime((p-1)//2) for p in primefactors(n))])
%o (PARI) isok(m) = if ((m>1) && !isprime(m), my(f=factor(m)[,1]); !#select(x->isprime(2*x+1), f) && !#select(x->isprime((x-1)/2), f)); \\ _Michel Marcus_, Feb 14 2022
%Y Subsequence of A350704 and A350706.
%Y Cf. A005384, A005385, A053176, A059500.
%K nonn
%O 1,1
%A _Karl-Heinz Hofmann_, Feb 14 2022
|