A320726 Composite numbers such that all other numbers obtained from all permutations of all subsets of the digits are noncomposite.
4, 6, 8, 9, 10, 20, 22, 30, 32, 33, 35, 50, 55, 70, 77, 111
Offset: 1
Examples
371 is in this sequence because it's composite and none of the numbers 1, 3, 7, 13, 17, 31, 37, 137, 173, 317, 713 and 731 is composite.
Programs
-
Mathematica
Select[Range[4, 10^3], Function[n, And[CompositeQ@ n, NoneTrue[DeleteCases[Flatten@ Map[If[Length@ # > 1, FromDigits /@ Permutations@ #, #] &, Rest@ Subsets@ IntegerDigits@ n], ?(# == n &)], CompositeQ]]]] (* _Michael De Vlieger, Nov 13 2018 *)
Comments