Problem #346
Game of Numbers
Ram and Shyam play a game, the game goes as follows:
You have been given a number m, all the divisors of m are written on sigma(m) separate balloons where sigma(m) denotes the number of divisors of m.
At each turn, a player can pop a balloon with the number x on it, if x is divisible by d or d is divisible by x where d is the number on the last balloon popped in the game.
Assume that Ram starts the game and the game has alternate turns. On initial turn, Ram can pop any balloon.
Let f(m)= 1 if Shyam wins else 0 if Ram wins.
If both players play optimally, find \sum\limits_{i=1}^{123456789} f(i)