Problem 3700 · Hard

Number of ZigZag Arrays II

The same up and down counts as a linear recurrence, raised to the power n minus 2 by matrix exponentiation.

Open the interactive visualisation