A162720 A014499 represented in binary.
1, 10, 10, 11, 11, 11, 10, 11, 100, 100, 101, 11, 11, 100, 101, 100, 101, 101, 11, 100, 11, 101, 100, 100, 11, 100, 101, 101, 101, 100, 111, 11, 11, 100, 100, 101, 101, 100, 101, 101, 101, 101, 111, 11, 100, 101, 101, 111, 101, 101, 101, 111, 101, 111, 10
Offset: 1
Examples
The 5th prime number is 11. The binary representation of 11 is 1011. There are 3 "1s" in 1011. 3 in binary is 11, so a(5)=3.
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1000
Programs
-
PARI
a(n)={fromdigits(digits(hammingweight(prime(n)), 2))} \\ Andrew Howroyd, Nov 08 2019
Formula
Extensions
Terms a(32) and beyond from Andrew Howroyd, Nov 08 2019