OFFSET
1,1
COMMENTS
In the first 672509 primes, 64894 of them (about 9.65%) are 2's-complement primes.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
If isPrime(p) And isPrime(2^(floor(Log(p, 2)) + 1) - p) then sequence.add(p)
If A(x) is the counting function of the terms a(n) <= x, then A(x) = O(xloglogx/(logx)^2) [From Vladimir Shevelev, Dec 04 2008]
EXAMPLE
a(5) = 19 because 19 is prime and (2^5 - 19) = (32 - 19) = 13 which is prime.
a(74) = 1777 because 1777 is prime and (2^11 - 1777) = (2048 - 1777) = 271 which is prime.
MATHEMATICA
Join[{2}, Select[Prime[Range[250]], PrimeQ[BitXor[#, 2^Ceiling[Log[2, #]] - 1] + 1] &]] (* Alonso del Arte, Feb 12 2013 *)
PROG
(PARI) select(n->isprime((2<<(log(n+.5)\log(2)))-n), primes(100)) \\ Charles R Greathouse IV, Feb 13 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Chuck Seggelin (barkeep(AT)plastereddragon.com), Jul 08 2003
STATUS
approved