0%

Problem 350


Problem 350


Constraining the least greatest and the greatest least

A list of size n is a sequence of n natural numbers.
Examples are (2,4,6), (2,6,4), (10,6,15,6), and (11).

The greatest common divisor, or gcd, of a list is the largest natural number that divides all entries of the list.
Examples: gcd(2,6,4) = 2, gcd(10,6,15,6) = 1 and gcd(11) = 11.

The least common multiple, or lcm, of a list is the smallest natural number divisible by each entry of the list.
Examples: lcm(2,6,4) = 12, lcm(10,6,15,6) = 30 and lcm(11) = 11.

Let f(G, L, N) be the number of lists of size N with gcd ≥ G and lcm ≤ L. For example:

f(10, 100, 1) = 91.
f(10, 100, 2) = 327.
f(10, 100, 3) = 1135.
f(10, 100, 1000) mod 1014 = 3286053.

Find f(106, 1012, 1018) mod 1014.


约束最小最大和最大最小

一个规模为n的列表是一个包含有n个自然数的序列。
例如(2,4,6)、(2,6,4)、(10,6,15,6)以及(11)。

列表的最大公约数,简记为gcd,是整除列表上所有数的最大自然数。
例如;gcd(2,6,4) = 2,gcd(10,6,15,6) = 1以及gcd(11) = 11。

列表的最小公倍数,简记为lcm,是被列表上所有数整除的最小自然数。
例如: lcm(2,6,4) = 12,lcm(10,6,15,6) = 30以及lcm(11) = 11。

记f(G, L, N)为所有规模为N、gcd ≥ G、lcm ≤ L的列表数目。例如:

f(10, 100, 1) = 91。
f(10, 100, 2) = 327。
f(10, 100, 3) = 1135。
f(10, 100, 1000) mod 1014 = 3286053。

求f(106, 1012, 1018) mod 1014