Add functional test that uses a recurrence sum