login
A243619
Prime numbers n whose digital sum equals the number of bits in its binary expansion.
3
2, 13, 23, 233, 251, 523, 541, 613, 631, 811, 1009, 1091, 1109, 1163, 1181, 1217, 1307, 1361, 1433, 1451, 1523, 1613, 1721, 1811, 1901, 2027, 4153, 4243, 4261, 4423, 4441, 4513, 4603, 4621, 4801, 5107, 5233, 5323, 5413, 5431
OFFSET
1,1
COMMENTS
Subset of A243615.
EXAMPLE
23 -> 2+3=5, 23=10111 -> Five bits.
MATHEMATICA
Select[Prime[Range[800]], Total[IntegerDigits[#]]==IntegerLength[#, 2]&] (* Harvey P. Dale, Nov 05 2019 *)
PROG
(PARI) isok(n) = isprime(n) && (sumdigits(n) == #binary(n)); \\ Michel Marcus, Jun 08 2014
CROSSREFS
Cf. A243615 (same principle but covers all natural numbers).
Sequence in context: A079397 A118524 A029971 * A243620 A090526 A362433
KEYWORD
nonn,base
AUTHOR
Andreas Boe, Jun 07 2014
STATUS
approved