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

Home > Numbers > Sequences
Given the term, find the number (Posted on 2008-02-15) Difficulty: 3 of 5
The sequence of numbers {Q(m)} is defined recursively by the following relationships:

Q(1) = 1, and:
Q(m) = 1 + Q(m/2), whenever m is ≥ 2 and even, and:
Q(m) = 1/Q(m-1), whenever m is ≥ 3 and odd.

Determine the value of d, given that Q(d) = 19/87

See The Solution Submitted by K Sengupta    
Rating: 4.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution No Subject | Comment 2 of 5 |
To find d we can build a "memory stack" of ODDs and EVENs from which we can then calculate d.

Every time we have a proper fraction we note upon the "memory stack" ODD and then take the inverse of the proper fraction to get an improper fraction. We then can convert the number into a a mixed number or a whole number.
If we get a mixed number, we add a number of EVENs to the "memory stack" equal to the value of the whole number, then subtract the whole number to leave a proper fraction at which we, again, note ODD upon our "memory stack" and repeat our processes.
If we get a whole number sans fraction, n, we end our looping and set d to an initial value of 2(n-1). Then, reading the "memory stack" top to bottom (LIFO), we multiply d by 2 everytime we read EVEN, and increment d by 1 everytime we read ODD.

In the case where we begin with 19/87, we have the following:
19/87 ............... ODD
87/19 = 4 11/19 ..... EVEN * 4
11/19 ............... ODD
19/11 = 1 8/11 ..... EVEN
 8/11 ............... ODD
11/8  = 1 3/8 ...... EVEN
 3/8  ............... ODD
 8/3  = 2 2/3 ...... EVEN * 2
 2/3  ............... ODD
 3/2  = 1 1/2 ...... EVEN
 1/2  ............... ODD
 2/1  = 2

Applying our algorithm we have,
d = ((((((((((22-1+1)*2)+1)*22)+1)*2)+1)*2)+1)*24)+1
Which calculates to
d = 1905
  Posted by Dej Mar on 2008-02-15 13:47:13
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 (14)
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