%I #13 Oct 22 2024 20:14:51
%S 1,2,6,10,19,28,42,51,75,79,104,114,138,148,152,178,187,212,221,247,
%T 278,338,348,372,423,465,490,504,525,539,669,679,683,709,729,848,858,
%U 873,883,909,961,1028,1071,1080,1089,1104,1202,1221,1247,1251,1354,1363
%N Numbers n such that neither composite(n)-+1 is composite.
%C a(n) = A066246(A014574(n)). - _Reinhard Zumkeller_, Apr 06 2010
%H Robert Israel, <a href="/A169643/b169643.txt">Table of n, a(n) for n = 1..10000</a>
%e a(1)=1 because composite(1)-1=3=prime and composite(1)+1=5=prime.
%p Comp:= remove(isprime,[$4..2000]): nC:= nops(Comp):
%p select(t -> isprime(Comp[t]-1) and isprime(Comp[t]+1), [$1..nC]); # _Robert Israel_, Oct 21 2024
%t Position[Select[Range[2000],CompositeQ],_?(AllTrue[#+{1,-1},PrimeQ]&),1,Heads->False]// Flatten (* _Harvey P. Dale_, Jan 16 2024 *)
%Y Cf. A002808, A014574, A066246.
%K nonn
%O 1,2
%A _Juri-Stepan Gerasimov_, Apr 04 2010
%E Corrected by _Ray Chandler_, Apr 05 2010