← Complete problem index

PROJECT EULER · #0440

GCD and Tiling

Statement only · UnsolvedOriginal problem ↗

We want to tile a board of length n and height 1 completely, with either 1×2 blocks or 1×1 blocks with a single decimal digit on top:

0440_tiles.png

For example, here are some of the ways to tile a board of length n=8:

0440_some8.png

Let T(n) be the number of ways to tile a board of length n as described above.

For example, T(1)=10 and T(2)=101.

Let S(L) be the triple sum a,b,cgcd(T(ca),T(cb)) for 1a,b,cL.
For example:
S(2)=10444
S(3)=1292115238446807016106539989
S(4)mod987898789=670616280.

Find S(2000)mod987898789.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.