OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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
Juri-Stepan Gerasimov, Apr 04 2010
EXTENSIONS
Corrected by Ray Chandler, Apr 05 2010
STATUS
approved