+0  
 
0
456
4
avatar

Let m/n be a fraction, where m and n are positive integers. Consider the operation defined by replacing m/n by (m+1)/(n+1) and then writing the result in lowest terms. For example, applying this operation to 5/14 would give 2/5. How many times must this operation be repeatedly applied to 1/2005 before we obtain 2004/2005?

 Oct 8, 2019
 #1
avatar
0

print 1/2005;print1/1003;print2/2004;print1/502;print2/503;p=0;a=1;b=168;cycle: c=a/b;printc;p=p+1;a++;b++;if(a<167, goto cycle, 0);e=0;b=2;a=1;cycle1:e=a/b;printe;p=p+1;b++;a++;if(a<2005, goto cycle1, 0);print"Total =",  p + 5

 

1 / 2005
1 / 1003
1 / 1002
1 / 502
2 / 503
1 / 168
2 / 169
3 / 170

.

.

. This continues until you reach:166/333 + 1 =1/2 =2/3=3/4=4/5=5/6.........2004/2005
2000 / 2001
2001 / 2002
2002 / 2003
2003 / 2004
2004 / 2005
Total = 2175 - The Final count

 Oct 8, 2019
 #2
avatar
0

P.S. 1 / 1002 should not be there. Remove it.

 Oct 8, 2019
 #3
avatar
0

btw, what is the final count

 Oct 8, 2019
 #4
avatar
0

How about: 2175 - 1 = 2174. 

 Oct 8, 2019

3 Online Users

avatar