Atom - Æ?
- To 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 to 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, 69 Æ?
gives [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
.