Problem 3470 · Hard

Permutations IV

Count the alternating-parity completions of each prefix, then pick the next value by skipping whole blocks of them.

Open the interactive visualisation