A new look on the generating function for the number of divisors