%I #17 Nov 10 2023 10:45:20
%S 5,17,19,29,31,41,43,53,67,71,79,89,97,101,103,109,113,127,131,137,
%T 139,149,151,163,173,181,191,197,199,211,223,229,233,239,241,251,257,
%U 269,271,281,283,293,307,311,317,331,337,349,353,367,373,379,389,401,409
%N Primes which are the sums of two consecutive nonprimes (A141468).
%C Five together with primes that are the sum of two consecutive composite numbers.
%H G. C. Greubel, <a href="/A167915/b167915.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n+1) = A060254(n) = A176902(n+1). - _Juri-Stepan Gerasimov_, Apr 28 2010
%e a(1)=1+4=5, a(2)=8+9=17.
%t 2*Select[Range[300], !PrimeQ[#] == !PrimeQ[#+1] && PrimeQ[2*#+1] &] + 1 (* _G. C. Greubel_, Jul 01 2016; Nov 10 2023 *)
%o (Magma) [2*n+1: n in [1..300] | (not IsPrime(n) eq not IsPrime(n+1)) and IsPrime(2*n+1)]; // _G. C. Greubel_, Nov 10 2023
%o (SageMath) [2*n+1 for n in (1..300) if (not is_prime(n)) - (not is_prime(n+1)) == 0 and is_prime(2*n+1)] # _G. C. Greubel_, Nov 10 2023
%Y Cf. A000040, A060254, A141468, A176902.
%K nonn
%O 1,1
%A _Juri-Stepan Gerasimov_, Nov 15 2009
%E Typo corrected and terms checked by _D. S. McNeil_, Nov 17 2010