A228118 Numbers consisting of only odd digits such that no permutation of its digits yields a semiprime.
1, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 99, 113, 117, 131, 135, 153, 171, 199, 311, 315, 333, 337, 351, 373, 513, 531, 555, 577, 711, 733, 757, 775, 777, 919, 991, 999, 1113, 1131, 1155, 1179, 1197, 1311, 1359, 1377, 1395, 1515, 1539, 1551, 1557
Offset: 1
Examples
117 is in this sequence because 117 = 3^2 * 13; 171 = 3^2 * 19; and 711 = 3^2 * 79.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
fQ[n_] := Block[{id = IntegerDigits@ n}, Union[ OddQ[id]][[1]] && !MemberQ[ Union[ PrimeOmega[ FromDigits@# & /@ Permutations[id]]], 2]]; Select[ Range[1, 1000, 2], fQ] (* Robert G. Wilson v, Aug 11 2013 *) npdsQ[n_]:=Module[{idn=IntegerDigits[n]},AllTrue[idn,OddQ]&&Count[ FromDigits/@ Permutations[idn],?(PrimeOmega[#]==2&)]==0]; Select[Range[ 1600],npdsQ] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale, Mar 24 2018 *)
Comments