TRICKY f(n)

This topic has expert replies
Source: — Problem Solving |

Master | Next Rank: 500 Posts
Posts: 392
Joined: Thu Jan 15, 2009 12:52 pm
Location: New Jersey
Thanked: 76 times

by truplayer256 » Mon May 18, 2009 1:13 pm
f(n)=f(n-1)-n and f(4)=10
f(4)=f(3)-4
10=f(3)-4
f(3)=14
f(3)=f(2)-3
17=f(2)

f(2)=17
f(3)=14
f(4)=10
Can you see the pattern here?

the difference between the two numbers is increasing by 1 each time as n increases.

The difference between f(5) and f(4) has to be 5, so

10-f(5)=5
f(5)=5

The difference between f(5) and f(6) has to be 6, so

5-f(6)=6
f(6)=-1

User avatar
Senior | Next Rank: 100 Posts
Posts: 51
Joined: Wed Apr 29, 2009 9:00 am
Thanked: 6 times

by anksgupta » Mon May 18, 2009 7:48 pm
could be calculated by putting n=5 1st and getting f(5),

Put n=6 and using f(5), f(6) can be calculated which is -1

Legendary Member
Posts: 2467
Joined: Thu Aug 28, 2008 6:14 pm
Thanked: 331 times
Followed by:11 members

by cramya » Mon May 18, 2009 8:42 pm
One way to solve:

f(6) = f(5) - 6
= f(4) - 5 - 6
= 10-5-6
= -1