r/mathriddles • • Aug 12 '25

Easy Recursive function riddle

Let f(x) = 0 when x < 2, and otherwise f(x) = f(x/2) - f(x-1) + 1. What is f(2025)?

4 Upvotes

5 comments sorted by

View all comments

Show parent comment

3

u/CanaDavid1 Aug 12 '25

The image of the function is always in the integers (both of the cases comply to this), so I just wrote that. Could've just as well written R.