Generating functions and recurrence relations