A265128 Nonprimes excluding numbers of the forms 2*p and p^i where p is a prime and i is a positive integer.
0, 1, 12, 15, 18, 20, 21, 24, 28, 30, 33, 35, 36, 39, 40, 42, 44, 45, 48, 50, 51, 52, 54, 55, 56, 57, 60, 63, 65, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 84, 85, 87, 88, 90, 91, 92, 93, 95, 96, 98, 99, 100, 102, 104, 105, 108, 110, 111, 112, 114, 115, 116
Offset: 1
Programs
-
Mathematica
Select[Range@ 120, And[! PrimeQ@ #, Nand[EvenQ@ #, PrimeQ[#/2]], ! PrimePowerQ@ #] &] (* Michael De Vlieger, Dec 02 2015 *)
-
PARI
isok(n) = ! (isprime(n) || (! (n%2) && isprime(n/2)) || isprimepower(n)); \\ Michel Marcus, Dec 02 2015