login
A331487
Primes p such that exactly one of 2^(p+1) - 3 and 2^(p+1) + 3 is a prime.
1
13, 17, 19, 23, 29, 83, 149, 173, 227, 389, 1109, 4001, 35753, 36551, 363119, 702193
OFFSET
1,1
COMMENTS
Primes p such that exactly one of k*2^p - 2*k + 1 and k*2^p + 2*k - 1 is a prime:
k = 1: odd terms in A000043;
k = 2: this sequence;
k = 3: 5, 13, 19, 29, 31, 109, 139, 271, 379, 1553, ...
k = 4: 2, 37, ...
k = 5: 3, 5, 7, 17, 19, 23, 41, 61, 67, 151, 157, 313, 4111, 6337, ...
k = 6: 2, 5, 7, 11, 19, 29, 149, 191, 373, 449, 983, 1667, 1973, ...
k = 7: 2, 3, 5, 7, 11, 13, 29, 43, 61, 97, 109, 127, 131, 239, 461, 1153, ...
k = 8: 3, 11, 19, 23, 29, 37, 43, 97, 193, 307, 617, 1847, ...
k = 9: 3, 5, 23, 41, 61, 71, 97, 131, 157, 863, 3119, ...
k = 10: 2, 3, 13, ...
...
EXAMPLE
13 is in this sequence because 2^(13+1) - 3 = 16381 (prime) and 2^(13+1) + 3 = 16387 (composite number).
MATHEMATICA
Select[Range[400], PrimeQ[#] && Xor @@ PrimeQ[2^(# + 1) + {-3, 3}] &] (* Amiram Eldar, Jan 19 2020 *)
PROG
(Magma) [p: p in PrimesUpTo(1000) | not (#[k: k in [2] | IsPrime(k*2^p-2*k+1)]) eq (#[k: k in [2] | IsPrime(k*2^p+2*k-1)])];
(PARI) isok(p) = isprime(2*2^p-3) + isprime(2*2^p+3) == 1;
forprime(p=2, 500, if(isok(p), print1(p, ", "))); \\ Jinyuan Wang, Jan 19 2020
CROSSREFS
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(12)-a(16) added using A050414 and A057732 by Jinyuan Wang, May 15 2020
STATUS
approved