回複:土耳其奧賽題:有理數函數(3星)

來源: 2009-04-14 12:44:26 [舊帖] [給我悄悄話] 本文已被閱讀:

f(a/b) = (a + b) / 2 for co-prime positive integers a, b.


We can compute f(n) easily. f(n) = (1 + n) /2 for positive integer n.

f(1/n) = f(n) = (1 + n) / 2


For general co-prime positive integers a, b,

we can reduce to this simple case above with a procedure like Euclidean method calculating the GCD (a, b).