login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243619 Prime numbers n whose digital sum equals the number of bits in its binary expansion. 3

%I #12 Nov 05 2019 20:19:25

%S 2,13,23,233,251,523,541,613,631,811,1009,1091,1109,1163,1181,1217,

%T 1307,1361,1433,1451,1523,1613,1721,1811,1901,2027,4153,4243,4261,

%U 4423,4441,4513,4603,4621,4801,5107,5233,5323,5413,5431

%N Prime numbers n whose digital sum equals the number of bits in its binary expansion.

%C Subset of A243615.

%H Andreas Boe, <a href="/A243619/b243619.txt">Table of n, a(n) for n = 1..10000</a>

%e 23 -> 2+3=5, 23=10111 -> Five bits.

%t Select[Prime[Range[800]],Total[IntegerDigits[#]]==IntegerLength[#,2]&] (* _Harvey P. Dale_, Nov 05 2019 *)

%o (PARI) isok(n) = isprime(n) && (sumdigits(n) == #binary(n)); \\ _Michel Marcus_, Jun 08 2014

%Y Cf. A243615 (same principle but covers all natural numbers).

%K nonn,base

%O 1,1

%A _Andreas Boe_, Jun 07 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)