A337491 Numbers k such that exactly one of 2*k + 3 and 4*k + 3 is prime.
8, 11, 13, 16, 22, 26, 28, 29, 31, 35, 37, 38, 41, 43, 44, 50, 53, 56, 59, 64, 65, 68, 70, 73, 74, 76, 80, 85, 86, 88, 91, 97, 98, 107, 109, 112, 113, 116, 118, 121, 122, 125, 127, 133, 134, 136, 137, 139, 142, 145, 146, 149, 151, 152, 155, 160, 161, 167, 170
Offset: 1
Keywords
Examples
a(1) = 8 is a term because 2*8 + 3 = 19 is a prime; but 4*8 + 3 = 35 = (5*7) is a composite number. a(4) = 16 is a term because 2*16 + 3 = 35 = (5*7) is a composite number; but 4*16 + 3 = 67 is a prime. a(6) = 26 is a term because 2*26 + 3 = 55 = (5*11) is a composite number; but 4*26 + 3 = 107 is a prime.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..5000
Programs
-
Maple
A337491:=n->`if`((isprime(2*n+3) xor isprime(4*n+3)), n, NULL): seq(A337491(n), n=1..500);
-
Mathematica
Select[Range[0, 250], Xor[PrimeQ[2 # + 3], PrimeQ[4 # + 3]] &] Select[Range[200],Total[Boole[PrimeQ[{2,4}#+3]]]==1&] (* Harvey P. Dale, Jan 26 2023 *)
-
PARI
isok(k) = bitxor(isprime(2*k+3), isprime(4*k+3)); \\ Michel Marcus, Aug 29 2020
Comments