A217790 Composite evil numbers (A001969) having no proper evil divisors.
77, 169, 209, 287, 329, 343, 407, 413, 427, 469, 533, 553, 649, 679, 703, 763, 869, 893, 917, 931, 1121, 1133, 1169, 1253, 1271, 1331, 1337, 1351, 1369, 1391, 1393, 1457, 1477, 1501, 1517, 1589, 1631, 1661, 1757, 1781, 1813, 1829, 1963, 1991, 2033, 2191, 2209
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
evilQ[n_] := EvenQ@Total@IntegerDigits[n, 2]; okQ[n_] := evilQ[n] && ! PrimeQ[n] && Catch[Do[If[evilQ[d], Throw[False]], {d, Most@Rest@Divisors@n}]; True]; Select[Range@3000, okQ] (* Giovanni Resta, Mar 28 2013 *)
-
PARI
isevil(n) = hammingweight(n) % 2 == 0; noevildiv(n) = {fordiv(n, d, if ((d < n) && isevil(d), return (0));); 1;} lista(nn) = {forcomposite(n=1, nn, if (isevil(n) && noevildiv(n), print1(n, ", ")););} \\ Michel Marcus, Feb 08 2016
Comments