Math? I Thought This Was Computer Science!

Let $$f(a,b)$$ be the largest integer $$c$$ such that $$a \equiv 0 \pmod{b^c}$$. For example, $$f(22,3) = 0$$, $$f(42,7) = 1$$, $$f(72,6) = 2$$, and $$f(243,3) = 5$$.

Let $G(n) = \displaystyle \sum_{i=1}^n \sum_{j=2}^\infty f(i,j).$

For example, $$G(25) = 76$$, $$G(1000) = 7004$$, and $$G(100000) = 1166220$$.

Compute the value of $$G(10^8)$$.

×