All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math > Calculus
Strange sequence (Posted on 2005-11-15) Difficulty: 4 of 5
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!

  Submitted by e.g.    
Rating: 3.1667 (6 votes)
Solution: (Hide)
Clearly f(n) is always less than n, and checking the first few values by hand it appears to be increasing, with f(n+1) equaling either f(n) or f(n)+1. A reasonable guess is that f(n) is approximately c*n, for some constant c. To find what c is if this is the case, consider f(n)/n = 1 - f(f(n-1)))/n. In the limit as n goes to infinity, the left side becomes c, and the right side becomes 1 - c². Since one must equal the other c=1-c², and rejecting the negative root we have that c is ½(-1+√5). Examining the values of c*n rapidly leads to the conclusion that f(n)= [c*(n+1)], where [x] is the smallest integer less than or equal to x.

To prove this, note that if x>0 is not an integer, then [-x] = -[x] - 1. Now n - [c*[c*n] + c] = n + [-c*[c*n] - c] + 1 = n + 1 + [ -c^2*n - c*e - c ], where e = c*n - [c*n]. Since c^2 = 1-c, this equals n + 1 + [-n - c*n - c*e - c] = 1 + [c*n - c*e - c] = [c*n + c] + [f - c*e - 2c + 1], where f = c*n + c - [c*n + c]. Now if e+c<1, f=e+c; if e+c ≥ 1, f=e+c-1. It follows easily from this that [f - c*e - 2c + 1] is always 0. Since f(0) = 1 = [c*0 + c], the truth of our hypothesis follows, and it also follows that f(1000000000000) = 618033988750.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
AnswerK Sengupta2008-11-11 01:29:40
re(2): solution - no computer, error (??)pcbouhid2008-05-14 21:33:15
Questionre: solution - no computer, errorBon2006-07-23 16:21:16
re(2): solution - no computer - to Bobpcbouhid2005-11-15 14:43:42
re(2): solution - no computer - correctionpcbouhid2005-11-15 14:41:25
re: solution - no computerCharlie2005-11-15 14:25:49
re: solution - no computerBob Smith2005-11-15 14:15:57
Solutionsolution - no computerpcbouhid2005-11-15 14:05:50
SolutionSolution--computer used thrice...Charlie2005-11-15 11:46:21
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information