The requirement to work with one variable is stupid, unless it's an academic exercise. And even then it's stupid. Is someone having a joke at your expense?
So, you could present the recursive solution, then lean backward in your chair, arms crossed over your head, and chuckle knowingly to...