OFFSET
1,1
COMMENTS
By definition no power of 2 is in the sequence.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
23 is in the sequence because the binary expansion of 23 is 10111 and 10111 has four 1's, and 4 is a composite number (A002808).
MATHEMATICA
Select[Range[200], CompositeQ[DigitCount[#, 2, 1]] &] (* Amiram Eldar, Jul 23 2023 *)
PROG
(PARI) isok(n) = my(w = hammingweight(n)); (w != 1) && !isprime(w); \\ Michel Marcus, Aug 15 2018
(Python) from sympy import isprime; isok = lambda n: n & (n-1) and not isprime(bin(n).count('1')) # David Radcliffe, Aug 15 2018
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Omar E. Pol, Aug 10 2018
STATUS
approved