You are Here: Home >< Maths

# -RM- watch

1. -RM-
2. (Original post by UCASLord)
Let f(n) be a function, defined for any integer n <= 0 as follows:

1 if n = 0
f(n) = (f(n/2))^2 if n > 0 and and n is even
2f(n-1) if n > 0 and n is odd

What is the value of f(5)

My working:

2f(4) = 2(f(2))^2 = 2((f(1)^2))^2

I can't figure out what to do next.
Keep going. You've expressed f(5) in terms of f(4), f(4) in terms of f(2), f(2) in terms of f(1)... What does the definition of f say you should do with f(1)?
3. -RM-
4. (Original post by UCASLord)
The next logical step I can think of for this question is 2((f(1)^2))^2 = 2(((f(0.5)^2)^2)^2)
Hang on a moment - is 1 even or odd?!
5. (Original post by UCASLord)
Sorry for taking a while to get back to you, I was working on other problems and only looked at my computer now :P

The next logical step I can think of for this question is 2((f(1)^2))^2 = 2(((f(0.5)^2)^2)^2)

The issue is that I can just keep going like this, with that number approaching infinity, but never reaching it so I would never actually get to a situation where n = 0. Of course, it does say "for any integer" in the question, but it doesn't specify what to do with non-integers.
If it says "for any integer" then it's telling you that you can only apply the rules when n is an integer - this should be a pointer to the fact that you've gone wrong somewhere

Also note that you have a typo in your original post - you should have n >= 0, not n <= 0.
6. -RM-
7. (Original post by UCASLord)
... Wow.

Thanks for you help :P
These things happen when you're in the middle of a load of MAT problems...

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: October 8, 2017
Today on TSR

### TSR Pub Quiz 2018 - Anime

The first of our week-long series of entertainment quizzes

### University open days

Wed, 21 Nov '18
• Buckinghamshire New University
Wed, 21 Nov '18
• Heriot-Watt University
Wed, 21 Nov '18
Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams