← RoseCode

ROSECODE 501

Product of phi

liuguangxi · Math ·

Given two positive integers n and k, define function T(n,k)=a1=1ka2=1kan=1kφ(i=1nai) where φ(x) is Euler's totient function.

For example, T(2,3) = φ(1×1) φ(1×2) φ(1×3) φ(2×1) φ(2×2) φ(2×3) φ(3×1) φ(3×2) φ(3×3) = 192. And you are given T(10,10)mod1000000007=7103300.

Find T(107,107)mod1000000007.
Thanks to C_K_Yang for the idea.