Specifically for
coldtortuga
Jan. 1st, 2006 01:56 pmA variation on a previous theme:
| Base | Number | Number in Base 10 |
|---|---|---|
| 2 | 12 | 1 |
| 3 | 23 | 2 |
| 4 | 3124 | 54 |
| 5 | 4135 | 108 |
| 6 | 4126 | 152 |
| 7 | 651427 | 16200 |
| 8 | 76251348 | 2042460 |
| 9 | 82715369 | 4416720 |
| 10 | 986731210 | 9867312 |
| Still churning - these O(nn) algorithms really soak up the CPU time... (I later hit Ctrl-C, so all numbers after this point are from | ||
| 11 | A9876241311 | 2334364200 |
| 12 | B935217612 | 421877610 |
| 13 | CBA9584721313 | 1779700673520 |
no subject
Date: 2006-01-10 09:46 pm (UTC)In base n, start with the set of usable digits D={1, ..., n-1}. For each non-empty subset d of D (in Gray-code order, 'cause I already had a Gray-code subset generator), I find and test all the permutations of d (in the order given by Heaps' algorithm, 'cause I already had Heaps coded up). Gray-code + Heaps' algo does not the most efficient search-order make, but it's not too shabby.
The number of candidates to test in base n is given by A007526 which grows like e*n!