Answer:
[tex]g(n)=g(n/2)+n/2[/tex]
Step-by-step explanation:
[tex](2k+1)!=1*3*5*7*...*(2k-1)*(2k+1)*2*4*6*8*...*(2k-2)*(2k)[/tex]
Notice that the odd factors of above equality don't contribute to the largest power of 2 that divides (2k+1)!
Therefore, we can conclude that [tex]g(2n+1)=g(2n)[/tex].
[tex](2k)!=1*3*5*7*...*(2k-3)*(2k-1)*2*4*6*8*...*(2k-2)*(2k)=\\= (1*3*5*...*(2k-3)*(2k-1))*((2*1)*(2*2)*(2*3)*...*(2*(k-1))*(2*k))=\\= (1*3*5*...*(2k-3)*(2k-1))*2^k*k![/tex]
Notice that the odd factors of above equality don't contribute to the largest power of 2 that divides (2k)!
Hence, [tex]g(2k)-g(k)=k[/tex]
So for [tex]k = n/2[/tex],
[tex]g(n)-g(n/2)=n/2\\g(n)=g(n/2)+n/2[/tex]