A316412 Positive numbers m so that deletion of some or none but not all digits from m yields a noncomposite number.
1, 2, 3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 71, 73, 113, 131, 137, 173, 311, 317
Offset: 1
Examples
317 is a member since all its subsequences, i.e., 3, 1, 7, 31, 17, 37, 317, are noncomposite. 313 is not a member since one of its subsequences (33) is composite.
Programs
-
Mathematica
Select[Range[10^3], AllTrue[FromDigits /@ Union@ Rest@ Subsets@ IntegerDigits@ #, ! CompositeQ@ # &] &] (* Michael De Vlieger, Aug 05 2018 *)
Comments