- #1
JohnMcBetty
- 12
- 0
The Farey sequence F_n (F subscript n) for any positive integer n is the set of irreducible rational numbers a/b with 0<(or equal to)a<(or equal to)b<(or equal to) n and (a,b)=1 arranged in increasing order. The first one should be:
F_1 = {0/1,1/1}
F_2 = {0/1,1/2,1/1}
F_3 = {0/1,1/3,1/2,2/3,1/1}
F_4 = {0/1,1/4,1/3,1/2,2/3,3/4,1/1}
F_5 = {0/1,1/5,1/4,1/3,2/5,1/2,3/5,2/3,3/4,4/5,1/1}
I need to write a mathematica function that takes a positive integer n and returns, as a list, the nth Farey sequence, I really need some help?
F_1 = {0/1,1/1}
F_2 = {0/1,1/2,1/1}
F_3 = {0/1,1/3,1/2,2/3,1/1}
F_4 = {0/1,1/4,1/3,1/2,2/3,3/4,1/1}
F_5 = {0/1,1/5,1/4,1/3,2/5,1/2,3/5,2/3,3/4,4/5,1/1}
I need to write a mathematica function that takes a positive integer n and returns, as a list, the nth Farey sequence, I really need some help?