If f(0)=0 and for n>0, f(n)=n-f(f(n-1)),
what is f(1,000,000,000,000)?
Computer solutions welcome,
though a proof would be better!
(In reply to
solution - no computer by pcbouhid)
f(0) = 0
f(1) = 1 - f(f(0)) = 1 - f(0) = 1 - 0 = 1
f(2) = 2 - f(f(1)) = 2 - f(1) = 2 - 1 = 1
f(3) = 3 - f(f(2)) = 3 - f(1) = 3 - 1 = 2
f(4) = 4 - f(f(3)) = 4 - f(3) = 4 - 2 = 2 <---------------
f(5) = 5 - f(f(4)) = 5 - f(2) = 5 - 2 = 3
f(6) = 6 - f(f(5)) = 6 - f(3) = 6 - 3 = 3
f(7) = 7 - f(f(6)) = 7 - f(3) = 7 - 3 = 4
f(8) = 8 - f(f(7)) = 8 - f(4) = 8 - 4 = 4.
you have 4-f(f(3)) = 4-f(3), but f(3) = 2, so it should be 4-f(2)=4-1 =3
then the rest is wrong
|
Posted by Bon
on 2006-07-23 16:21:16 |