NOTE: This is a more difficult version of Problem 114.
A row measuring units in length has red blocks with a minimum length of units placed on it, such that any two red blocks (which are allowed to be different lengths) are separated by at least one black square.
Let the fill-count function, , represent the number of ways that a row can be filled.
For example, and .
That is, for , it can be seen that is the smallest value for which the fill-count function first exceeds one million.
In the same way, for , it can be verified that and , so is the least value for which the fill-count function first exceeds one million.
For , find the least value of for which the fill-count function first exceeds one million.
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.