Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

how to add two integers in their cantor expansion?

share|improve this question
add comment

2 Answers

You could define a Cantor Expansion so we don't have to search for it, please. The Cantor Expansion is defined as $x=\sum_1^n a_i i!$ where $0 \le a_i \le i$ So if $y=\sum_1^n b_i i!$, $x+y=\sum_1^n (a_i+b_i) i!$. The only problem comes if $a_i+b+i \gt i$ but then a carry is in order. Coefficient $i$ becomes $a_i+b_i-i-1$ and coefficient $i+1$ is increased by 1.

share|improve this answer
add comment

The same way you usually do it. Addition with carry from the least significant digit to the most significant digit. That works for any base where digit $k$ is worth $\prod_{i=1}^k a_i$ for arbitrary integers $a_i \geq 2$.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.