Atom - Æ¿
- From Primorial Base
Tags: arithmetic , math , number , array , vectorize , prime , base
Arity: monadic
This atom is monadic, which means it takes one argument.
Functionality
Convert a number from primorial base.
Details
Starting from the right, each place value has a maximum allowed digit of 1, 2, 4, 6, 10, ..., Nth prime - 1
. The place value of each digit is 1, 1×2, 1×2×3, 1×2×3×5, ...
. For example, if our digits are [2, 1, 1, 1]
, this is evaluated as 2×(1×2×3×5) + 1×(1×2×3) + 1×(1×2) + 1×(1) = 2×30 + 1×6 + 1×2 + 1×1 = 69
, so 2,1,1,1 Æ¿
evaluates to 69
.