integer_to_base_k_tuple

mathtools.integer_to_base_k_tuple(n, k)

Changes nonnegative integer n to base-k tuple.

Gets base-10 digits of 1066:

>>> mathtools.integer_to_base_k_tuple(1066, 10)
(1, 0, 6, 6)

Gets base-2 digits of 1066:

>>> mathtools.integer_to_base_k_tuple(1066, 2)
(1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0)

Returns tuple of positive integers.