Moessner's theorem
In number theory, Moessner's theorem or Moessner's magic is related to an arithmetical algorithm to produce an infinite sequence of the exponents of positive integers formula_1 with formula_2 by recursively manipulating the sequence of integers algebraically. The algorithm was first published by Alfred Moessner in 1951; the first proof of its validity was given by Oskar Perron that same year. For example, for formula_3, one can remove every even number, resulting in formula_4, and then add each odd number to the sum of all previous elements, providing formula_5. Construction. Write down every positive integer and  remove every formula_6-th element, with formula_6 a positive integer. Build a new sequence of partial sums with the remaining numbers. Continue by removing every formula_8-st element in the new sequence and producing a new sequence of partial sums. For the sequence formula_9, remove the formula_10-st elements and produce a new sequence of partial sums. The procedure stops at the formula_6-th sequence. The remaining sequence will correspond to formula_12 Example. The initial sequence is the sequence of positive integers, For formula_14, we remove every fourth number from the sequence of integers and add up each element to  the sum of the previous elements Now we remove every third element and continue to add up the partial sums Remove every second element and continue to add up the partial sums which recovers formula_18. Variants. If the triangular numbers are removed instead, a similar procedure leads to the sequence of factorials formula_19