Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

n-adic expansion of integers

If I use Integer('z',36) I get 35 as expected, but Integer('z',37) throws an error, from which I deduce that possible bases for n-adic expansion are {2,3,...,36} and 1, 2, 3, ..., 8, 9, a=10(dez), b=11(dez), ..., z=35(dez) is the maximal possible digit set.

What can I do if I wanted to get the expansion for a larger base? Do I have to reinvent the wheel?

Note that I do want to not only use primes as basis.

n-adic expansion of integers

If I use Integer('z',36) I get 35 as expected, but Integer('z',37) throws an error, from which I deduce that possible bases for n-adic expansion are {2,3,...,36} and 1, 2, 3, ..., 8, 9, a=10(dez), b=11(dez), ..., z=35(dez) is the maximal possible digit set.

What can I do if I wanted to get the expansion for a larger base? Do I have to reinvent the wheel?

Note that I do want to not only use primes as basis.

click to hide/show revision 3
retagged

n-adic expansion of integers

If I use Integer('z',36) I get 35 as expected, but Integer('z',37) throws an error, from which I deduce that possible bases for n-adic expansion are {2,3,...,36} and 1, 2, 3, ..., 8, 9, a=10(dez), b=11(dez), ..., z=35(dez) is the maximal possible digit set.

What can I do if I wanted to get the expansion for a larger base? Do I have to reinvent the wheel?

Note that I do want to not only use primes as basis.