Let $f(n)$ be the largest prime factor of $n$.

Let $g(n) = f(n) + f(n + 1) + f(n + 2) + f(n + 3) + f(n + 4) + f(n + 5) + f(n + 6) + f(n + 7) + f(n + 8)$, the sum of the largest prime factor of each of nine consecutive numbers starting with $n$.

Let $h(n)$ be the maximum value of $g(k)$ for $2 \le k \le n$.

You are given:

Find $h(10^{16})$.