0%

Problem 440


Problem 440


GCD and Tiling

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:

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

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,c gcd(T(ca), T(cb)) for 1 ≤ a, b, c ≤ L.
For example:
S(2) = 10444
S(3) = 1292115238446807016106539989
S(4) mod 987 898 789 = 670616280.

Find S(2000) mod 987 898 789.


最大公约数与摆方格

我们想要用1 × 2的空白方格或是1 × 1写有一个十进制数字的方格(如下所示)铺满长为n高为1的版面:

例如,下面是铺满长为n = 8的版面的一些方式:

记铺满长为n的版面的方式数为T(n)。

例如,T(1) = 10,T(2) = 101。

对于1 ≤ a, b, c ≤ L,记S(L)是三重求和∑a,b,c gcd(T(ca), T(cb)) 。
例如:
S(2) = 10444
S(3) = 1292115238446807016106539989
S(4) mod 987 898 789 = 670616280.

求 S(2000) mod 987 898 789。