yaworsw/euler-manager

View on GitHub
data/problems/115.yml

Summary

Maintainability
Test Coverage
---
:id: 115
:name: Counting block combinations II
:url: https://projecteuler.net/problem=115
:content: |+
  NOTE: This is a more difficult version of [Problem 114](problem=114).

  A row measuring _n_ units in length has red blocks with a minimum length of _m_ 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, F(_m_, _n_), represent the number of ways that a row can be filled.

  For example, F(3, 29) = 673135 and F(3, 30) = 1089155.

  That is, for _m_ = 3, it can be seen that _n_ = 30 is the smallest value for which the fill-count function first exceeds one million.

  In the same way, for _m_ = 10, it can be verified that F(10, 56) = 880711 and F(10, 57) = 1148904, so _n_ = 57 is the least value for which the fill-count function first exceeds one million.

  For _m_ = 50, find the least value of _n_ for which the fill-count function first exceeds one million.