# addition in cantor expansion

how to add two integers in their cantor expansion?

-
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.

-
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$.

-
add comment