- #1
GetToTheChopa
- 2
- 0
I am very new with Mathematica and I need help writing a program that generates a Farey Sequence.
Farey[n] := ?
The result should appear as follows, for those values of N.
Farey[1] = {0/1,1/1}
Farey[2] = {0/1,1/2,1/1}
Farey[3] = {0/1,1/3,1/2,2/3,1/1}
Farey[4] = {0/1,1/4,1/3,1/2,2/3,3/4,1/1}
Farey[5] = {0/1,1/5,1/4,1/3,2/5,1/2,3/5,2/3,3/4,4/5,1/1}
Farey[n] := ?
The result should appear as follows, for those values of N.
Farey[1] = {0/1,1/1}
Farey[2] = {0/1,1/2,1/1}
Farey[3] = {0/1,1/3,1/2,2/3,1/1}
Farey[4] = {0/1,1/4,1/3,1/2,2/3,3/4,1/1}
Farey[5] = {0/1,1/5,1/4,1/3,2/5,1/2,3/5,2/3,3/4,4/5,1/1}