The Student Room Group

-RM-

-RM-
(edited 6 years ago)
Reply 1
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)?
Reply 2
-RM-
(edited 6 years ago)
Reply 3
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?!
Reply 4
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 :smile:

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

:facepalm2:

Thanks for you help :P


These things happen when you're in the middle of a load of MAT problems...

Quick Reply

Latest