Skip to content

MixedRadixNumerals ​

A name from the enumeratio catalogue with no kernel of its own yet; this page carries its crosswalk only.

Wolfram's own MixedRadix, mapped through for the transpiler and the oracle but not yet written up here.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageMixedRadix✓
MixedRadixNumerals(...)Wolfram's own MixedRadix, mapped through for the transpiler and the oracle but not yet written up here.
Typed signatures
TypePackageApplies
(list<integer>) -> valuenumeralsalways

Domain: Wolfram

Examples

Basic #

Digits for 571 in radices 12, 9, 6, with the top digit unbounded

live ↗
InIntegerDigits(571,MixedRadixNumerals([12,9,6]))\mathrm{IntegerDigits}(571, \mathrm{MixedRadixNumerals}(\bigl\lbrack12, 9, 6\bigr\rbrack))Out[10,5,1]\bigl\lbrack10, 5, 1\bigr\rbrack
Scope #

Four digits needed for 1024 with radices 6, 4, 2

live ↗
InIntegerLength(1 024,MixedRadixNumerals([6,4,2]))\mathrm{IntegerLength}(1\,024, \mathrm{MixedRadixNumerals}(\bigl\lbrack6, 4, 2\bigr\rbrack))Out44

Digits of 534 for radices 15, 10, 5

live ↗
InIntegerDigits(534,MixedRadixNumerals([15,10,5]))\mathrm{IntegerDigits}(534, \mathrm{MixedRadixNumerals}(\bigl\lbrack15, 10, 5\bigr\rbrack))Out[10,6,4]\bigl\lbrack10, 6, 4\bigr\rbrack

FromDigits inverts the digit expansion above

live ↗
InFromDigits([10,6,4],MixedRadixNumerals([15,10,5]))\mathrm{FromDigits}(\bigl\lbrack10, 6, 4\bigr\rbrack, \mathrm{MixedRadixNumerals}(\bigl\lbrack15, 10, 5\bigr\rbrack))Out534534

Reversing the digits of 1024 and reading them back gives 25

live ↗
InIntegerReverse(1 024,MixedRadixNumerals([6,4,2]))\mathrm{IntegerReverse}(1\,024, \mathrm{MixedRadixNumerals}(\bigl\lbrack6, 4, 2\bigr\rbrack))Out2525
Applications #

A long prime-radix expansion of a million

live ↗
InIntegerDigits(1 000 000,MixedRadixNumerals([19,17,13,11,7,5,3,2]))\mathrm{IntegerDigits}(1\,000\,000, \mathrm{MixedRadixNumerals}(\bigl\lbrack19, 17, 13, 11, 7, 5, 3, 2\bigr\rbrack))Out[1,16,3,9,6,1,2,0]\bigl\lbrack1, 16, 3, 9, 6, 1, 2, 0\bigr\rbrack

A factorial-style base gives digits of 437 in radices 6 down to 1

live ↗
InIntegerDigits(437,MixedRadixNumerals([6,5,4,3,2,1]))\mathrm{IntegerDigits}(437, \mathrm{MixedRadixNumerals}(\bigl\lbrack6, 5, 4, 3, 2, 1\bigr\rbrack))Out[3,3,0,2,1,0]\bigl\lbrack3, 3, 0, 2, 1, 0\bigr\rbrack
Properties #

The leading digit may exceed its radix when the number is too big, here 19

live ↗
InIntegerDigits(100 000,MixedRadixNumerals([10,9,8,7]))\mathrm{IntegerDigits}(100\,000, \mathrm{MixedRadixNumerals}(\bigl\lbrack10, 9, 8, 7\bigr\rbrack))Out[19,8,3,5,5]\bigl\lbrack19, 8, 3, 5, 5\bigr\rbrack

With equal radices of 10 it is ordinary decimal

live ↗
InIntegerDigits(4 237,MixedRadixNumerals([10,10,10,10]))\mathrm{IntegerDigits}(4\,237, \mathrm{MixedRadixNumerals}(\bigl\lbrack10, 10, 10, 10\bigr\rbrack))Out[4,2,3,7]\bigl\lbrack4, 2, 3, 7\bigr\rbrack

Radices 10, 8, 6, 4, 2 give five digits

live ↗
InIntegerDigits(2 135,MixedRadixNumerals([10,8,6,4,2]))\mathrm{IntegerDigits}(2\,135, \mathrm{MixedRadixNumerals}(\bigl\lbrack10, 8, 6, 4, 2\bigr\rbrack))Out[5,4,2,3,1]\bigl\lbrack5, 4, 2, 3, 1\bigr\rbrack

Ten thousand seconds as hours, minutes, seconds: 2 h 46 m 40 s

live ↗
InIntegerDigits(10 000,MixedRadixNumerals([24,60,60]))\mathrm{IntegerDigits}(10\,000, \mathrm{MixedRadixNumerals}(\bigl\lbrack24, 60, 60\bigr\rbrack))Out[2,46,40]\bigl\lbrack2, 46, 40\bigr\rbrack

The round trip: 2 h 46 m 40 s is 10000 seconds

live ↗
InFromDigits([2,46,40],MixedRadixNumerals([24,60,60]))\mathrm{FromDigits}(\bigl\lbrack2, 46, 40\bigr\rbrack, \mathrm{MixedRadixNumerals}(\bigl\lbrack24, 60, 60\bigr\rbrack))Out10 00010\,000
About
Examples12
Checked againstWolfram Language 12 agree
CrosswalkWolfram Language