import math mod = 10**9+7 a, b, n = map(int,input().split()) ans = 1 def solve(p, gcd): global ans if p == n: ans = ans*gcd%mod return for i in range(a,b+1): solve(p+1, math.gcd(i, gcd)) solve(0, 0) print(ans)