Scaling and density of states of fractal lattices from a generating function point of view