TCS
Company
In one of the mathematics books, the pages were numbered incorrectly. The page number on the nth page was f(n) where:
f(1) = 8
f(2*n) = f(n)
f(2*n+1) = f(n) + f(n+1)
What was the page number on 13th page?
13
40
32
55
8
Read Solution (Total 4)
-
- f(13)=f(2*6+1).here n value is 6,so f(6)+f(6+1)=f(6)+f(7).
now we need to find values of f(6) and f(7)
f(6)=f(2*3)=f(3).
now find f(7)=f(2*3+1)=f(3)+f(3+1)=f(3)+f(4).
find values of f(3),f(3) and f(4)..
f(3)=f(2*1+1)=f(1)+f(1+1)=f(1)+f(2)..
we have f(1)=8 given.so we need to find still f(2)
f(2)=f(2*1)=f(1)=8
therefore value of f(3)=f(1)+f(2)=8+8=16..
now find value of f(4)=f(2*2)=f(2)=8(already calculated above)
Finally we have f(3)+f(3)+f(4)=16+16+8=40
so ans is 40........ - 11 years agoHelpfull: Yes(18) No(0)
- ans z 40..by putting the values..
- 11 years agoHelpfull: Yes(13) No(3)
- 32....yr by puttng d values in d eqn...
- 11 years agoHelpfull: Yes(3) No(18)
- its 30 not 42
- 11 years agoHelpfull: Yes(0) No(0)
TCS Other Question