Smallest power of 6 whose decimal expansion contains n: Difference between revisions
Content added Content deleted
m (made sure that the power is supposed to be an non-negative integer, no fair taking square roots or using negative powers.) |
m (→{{header|Factor}}: simplify somewhat) |
||
Line 16: | Line 16: | ||
: smallest ( m -- n ) |
: smallest ( m -- n ) |
||
powers-of-6 |
present powers-of-6 [ present subseq? ] with lfilter car ; |
||
22 [ dup smallest commas "%2d %s\n" printf ] each-integer</lang> |
22 [ dup smallest commas "%2d %s\n" printf ] each-integer</lang> |