OFFSET
1,1
LINKS
Anthony Sand, Table of n, a(n) for n = 1..1000
EXAMPLE
2 + digitsum(2,base=2) = 2 + digitsum(10) = 2 + 1 = 3, which is prime.
3 + digitsum(11) = 3 + 2 = 5.
5 + digitsum(101) = 5 + 2 = 7.
17 + digitsum(10001) = 17 + 2 = 19.
43 + digitsum(101011) = 43 + 4 = 47.
MATHEMATICA
Select[Prime@ Range@ 400, PrimeQ[# + Total@ IntegerDigits[#, 2]] &] (* Michael De Vlieger, Nov 06 2018 *)
PROG
(PARI) lista(lim) = forprime(p=2, lim, if (isprime(p+hammingweight(p)), print1(p, ", "))); \\ Michel Marcus, Jun 10 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Anthony Sand, Jun 05 2014
EXTENSIONS
Name edited by M. F. Hasler, Nov 07 2018
STATUS
approved