login
A174047
Numbers k such that exactly one of 2*k-1 and 2*k+1 is prime.
2
1, 4, 5, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 22, 23, 24, 26, 27, 29, 31, 33, 34, 35, 37, 39, 40, 41, 42, 44, 45, 48, 49, 50, 52, 53, 55, 56, 57, 63, 64, 65, 66, 68, 70, 74, 76, 78, 79, 81, 82, 83, 84, 86, 87, 89, 91, 95, 97, 98, 100, 105, 106, 111, 112, 113, 115, 116, 117, 119, 121, 125, 126, 128, 129, 131
OFFSET
1,2
LINKS
EXAMPLE
a(1)=1 because 2*1-1=1 is nonprime and 2*1+1=3 is prime.
MAPLE
P:= [seq(ithprime(i), i=2..100)]:
PD:= P[2..-1]-P[1..-2]:
Q:= select(t -> PD[t]<>2, [$1..98]):
1, op(map(i -> ((P[i]+1)/2, (P[i+1]-1)/2), Q)); # Robert Israel, May 06 2019
MATHEMATICA
Select[Range[150], Sort[PrimeQ[2 #+{1, -1}]]=={False, True}&] (* Harvey P. Dale, Aug 21 2013 *)
CROSSREFS
Sequence in context: A276705 A168044 A248188 * A285085 A231507 A097482
KEYWORD
nonn,easy,less
AUTHOR
EXTENSIONS
Corrected by Charles R Greathouse IV, Mar 23 2010
STATUS
approved