login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A169643
Numbers n such that neither composite(n)-+1 is composite.
3
1, 2, 6, 10, 19, 28, 42, 51, 75, 79, 104, 114, 138, 148, 152, 178, 187, 212, 221, 247, 278, 338, 348, 372, 423, 465, 490, 504, 525, 539, 669, 679, 683, 709, 729, 848, 858, 873, 883, 909, 961, 1028, 1071, 1080, 1089, 1104, 1202, 1221, 1247, 1251, 1354, 1363
OFFSET
1,2
COMMENTS
a(n) = A066246(A014574(n)). - Reinhard Zumkeller, Apr 06 2010
LINKS
EXAMPLE
a(1)=1 because composite(1)-1=3=prime and composite(1)+1=5=prime.
MAPLE
Comp:= remove(isprime, [$4..2000]): nC:= nops(Comp):
select(t -> isprime(Comp[t]-1) and isprime(Comp[t]+1), [$1..nC]); # Robert Israel, Oct 21 2024
MATHEMATICA
Position[Select[Range[2000], CompositeQ], _?(AllTrue[#+{1, -1}, PrimeQ]&), 1, Heads->False]// Flatten (* Harvey P. Dale, Jan 16 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected by Ray Chandler, Apr 05 2010
STATUS
approved