Moessner's theorem
A friendly hello in search of help,
Moessner's theorem is well known to me from number theory. It is vividly described in https://en.wikipedia.org/wiki/Moessner%27s_theorem and https://thatsmaths.com/2017/09/14/moessners-magical-method/. I would now like to experiment numerically with this sentence for a change in "practice". Starting from the sequence of natural numbers 1, 2, 3 ... a subsequence is removed from it according to an essentially arbitrary rule (e.g. every third number, square numbers, prime numbers, ...). The sequence of partial sums is formed from the remainder. With the sequence of the partial sums, the procedure is repeated with the same selection rule until it logically breaks off. And that's my programming problem. In MC14 I can't get a handle on the selection, the sequence of partial sums and the repetition as an algorithm, it was always vector nonsense that I don't want to publish here.
It would be helpful if I could get a program skeleton with hints using the example "Selection of every third natural number".
Kind regards, Alfred Flasshaar



