A125494 Composite evil numbers.
6, 9, 10, 12, 15, 18, 20, 24, 27, 30, 33, 34, 36, 39, 40, 45, 46, 48, 51, 54, 57, 58, 60, 63, 65, 66, 68, 72, 75, 77, 78, 80, 85, 86, 90, 92, 95, 96, 99, 102, 105, 106, 108, 111, 114, 116, 119, 120, 123, 125, 126, 129, 130, 132, 135, 136, 141, 142, 144, 147, 150, 153
Offset: 1
Examples
12 is in the sequence since it is composite and its base-2 representation (1100) has an even number of 1's.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Maple
a:=proc(n) local n2: n2:=convert(n,base,2): if add(n2[j],j=1..nops(n2)) mod 2 = 0 and isprime(n)=false then n else fi end: seq(a(n),n=1..180); # Emeric Deutsch, Jan 01 2007
-
Mathematica
Select[Range[153], EvenQ @ DigitCount[#, 2][[1]] && CompositeQ[#] &] (* Amiram Eldar, Dec 09 2019 *)
-
PARI
isok(n) = (n>0) && !isprime(n) && !(hammingweight(n) % 2); \\ Michel Marcus, Mar 29 2019
Extensions
Corrected and extended by Emeric Deutsch, Jan 01 2007