What about something like this?
, ". (,/@:,"1/)^:3~ ,.'0126'
0 1 2 6 10 11 12 16 20 21 22 26 60 61 62 66 100 101 102 106 110 111 ...
If S is the set of our digits, then the above essentially is just the Cartesian
product S^4.
On Sun, Oct 20, 2019 at 06:08:48PM -0500, Skip Cave wrote:
> Is there a less-verbose way to list all the integers (one-digit, two-digit,
> three-digit, four-digit) can be formed by using the characters 0, 1, 2, and
> 6 once? I used multiple takes:
>
> *#b=.~.>10#.ea({1{."1 a),({2{."1 a),({3{."1 a),{a=.(perm 4){0 1 2 6*
>
> *49*
>
> *b*
>
> *0 1 2 6 10 12 16 20 21 26 60 61 62 102 106 120 126 160 162 201 206 210 216
> 260 261 601 602 610 612 620 621 1026 1062 1206 1260 1602 1620 2016 2061
> 2106 2160 2601 2610 6012 6021 6102 6120 6201 6210*
>
>
> Skip Cave
> Cave Consulting LLC
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm