Problem #166
Apples for Ryuk
Light Yagami has to buy apples for Ryuk without attracting any unwanted attention towards himself. Interestingly, the number of apples he buys everyday is always a Fermat Number. A Fermat number is a number of the form 2^{2^{n}} + 1. G(N) = sum of digits of Nth Fermat Number modulo 9 Find the sum of G(i) for all i between 1 and 999999999999(both inclusive).