Recurrences and generating functions: what happens when you turn a sequence into a function