|
|
A162720
|
|
A014499 represented in binary.
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
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.
|
|
PROG
|
(PARI) a(n)={fromdigits(digits(hammingweight(prime(n)), 2))} \\ Andrew Howroyd, Nov 08 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|