The
real farey sequence starts from 0/1 and end at 1/0 and we can
get the median of this sequence by (0+1)/(1+0) which is 1/1. In
this problem the sequence is 1/n to 1/1 and ascending order. So
we can start a farey sequence by (1/n,1/1) then calculate (1/n,
1+1/n+1,1/1) but in this case we have to reduce the fraction in
lowest form. But if we start creating sequence (1/0,1/1) then
stop when the denominator will be greater then n. In this way we
can create a feray sequence. Here the farey sequence for n=5 is,
0/1
1/1
0/1
1/2
1/1
0/1
1/3
1/2
2/3
1/1
0/1
1/4
1/3 2/5
1/2 3/5 2/3 3/4
1/1
0/1 1/5 1/4 1/3
2/5 1/2 3/5 2/3 3/4 4/5
1/1
Now just leave 0/1 you got
the sequence.
|