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!)
A356876 Binary weight of the composite numbers (A002808). 1
1, 2, 1, 2, 2, 2, 3, 4, 1, 2, 2, 3, 3, 2, 3, 3, 4, 3, 4, 1, 2, 2, 3, 2, 3, 4, 2, 3, 3, 4, 4, 2, 3, 3, 4, 3, 4, 5, 3, 4, 4, 4, 5, 6, 1, 2, 2, 2, 3, 3, 2, 3, 4, 3, 4, 4, 2, 3, 3, 3, 4, 4, 5, 3, 4, 5, 4, 5, 5, 6, 2, 3, 4, 3, 4, 3, 4, 4, 4, 5, 6, 3, 4, 5, 4, 5, 5, 6, 4, 5, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A000120(A002808(n)).
MATHEMATICA
DigitCount[#, 2, 1] & /@ Select[Range[125], CompositeQ] (* Amiram Eldar, Oct 03 2022 *)
PROG
(Python)
from sympy import isprime
print([bin(k)[2:].count("1") for k in range(4, 123) if not isprime(k)])
(PARI) forcomposite (k=0, 120, print1 (hammingweight(k), ", ")) \\ Hugo Pfoertner, Oct 03 2022
CROSSREFS
Sequence in context: A052954 A123505 A320779 * A114920 A283190 A030361
KEYWORD
base,nonn,easy
AUTHOR
Karl-Heinz Hofmann, Oct 02 2022
STATUS
approved

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 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)