ps=Sort@Select[FromDigits /@ Subsets[Range@9, {1, \[Infinity]}], PrimeQ]; Multicolumn[ps, {Automatic, 6}, Appearance -> "Horizontal"]