%I #24 May 15 2019 10:39:41
%S 5,23,71,83,101,113,197,281,317,353,359,373,401,467,599,619,683,739,
%T 751,773,977,1091,1097,1103,1217,1223,1229,1237,1283,1303,1307,1429,
%U 1433,1489,1553,1559,1601,1607,1613,1619,1699,1873,1879,2039,2347,2357,2389
%N Primes p such that, in base 2, p - digitsum(p) is also a prime.
%C In all bases b, x = n - digitsum(n) is always divisible by b-1, therefore x can be prime only in base 2 and bases b for which b-1 is prime. For example, in base 10, n - digitsum(n) is always divisible by 10 - 1 = 9 -- see A066568 and A068395. In base 8, 9 = 11, therefore 11 - digitsum(11) = 9 - 2 = 7 is divisible by 7.
%H Anthony Sand, <a href="/A243442/b243442.txt">Table of n, a(n) for n = 1..1000</a>
%e 5 - digitsum(5,base=2) = 5 - digitsum(101) = 5 - 2 = 3.
%e 23 - digitsum(10111) = 23 - 4 = 19.
%e 71 - digitsum(1000111) = 71 - 4 = 67.
%e 83 - digitsum(1010011) = 83 - 4 = 79.
%e 101 - digitsum(1100101) = 101 - 4 = 97.
%t Select[Prime[Range[400]],PrimeQ[#-Total[IntegerDigits[#,2]]]&] (* _Harvey P. Dale_, May 15 2019 *)
%o (PARI) isok(n) = isprime(n) && isprime(n - hammingweight(n)); \\ _Michel Marcus_, Jun 05 2014
%Y Cf. A243441.
%K nonn,base
%O 1,1
%A _Anthony Sand_, Jun 05 2014