Rosetta Problems

Strange Sequence

https://atcoder.jp/contests/past202206-open/tasks/past202206_e