← RoseCode

ROSECODE 561

Least number divisible by each number of a sequence

C_K_Yang · Math ·

Given two integers m>0 and n>0, let L(m,n) be the number of sequences which satisfy the following properties:

  • Each number in the sequence is a natural number.
  • The least number divisible by each number of the sequence is m.
  • The length of the sequence is n.
  • Any two adjacent terms in the sequence are co-prime.

For example, L(4,3)=6, there are only 6 co-prime sequences: {1,1,4}, {1,4,1}, {2,1,4}, {4,1,1}, {4,1,2}, and {4,1,4}.

You are given L(10!,10)800548088(mod1000000007) and L(100!,100)73129372(mod1000000007)

Find L(1012!,1012)mod1000000007