OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1)=1 because 3 is prime and 1 is not prime.
a(2)=5 because 11 is prime and 9 is not prime.
MAPLE
filter:= n -> isprime(2*n+1) and not isprime(2*n-1):
select(filter, [$1..300]); # Robert Israel, Apr 27 2020
MATHEMATICA
Select[ Range[218], PrimeQ[2# + 1] && !PrimeQ[2# - 1] &] (* Robert G. Wilson v, Apr 18 2005 *)
PROG
(Magma) [n: n in [1..220]| not IsPrime(2*n-1) and IsPrime(2*n+1)] // Vincenzo Librandi, Jan 28 2011
(PARI) is(n)=isprime(2*n+1) && !isprime(2*n-1) \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Alexandre Wajnberg, Apr 17 2005
EXTENSIONS
More terms from Robert G. Wilson v, Apr 18 2005
STATUS
approved