OFFSET
0,4
COMMENTS
The first row contains the fractions 0/1, 1/1,
and thereafter we copy the previous row, interpolating (a+c)/(b+d) between each pair of adjacent fractions a/b, c/d.
This version of the Farey tree contains the fractions in the range [0,1].
REFERENCES
EXAMPLE
This version of the tree begins as follows:
.................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
...
With the fractions written as pairs, the first few rows are:
[[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], [2, 7], [1, 3], [3, 8], [2, 5], [3, 7], [1, 2], [4, 7,], [3, 5], [5, 8], [2, 3], [5, 7], [3, 4], [4, 5], [1, 1]]
...
MAPLE
# S[n] is the list of fractions, written as pairs [i, j], in row n of the triangle of Farey fractions
S[0]:=[[0, 1], [1, 1]];
for n from 1 to 6 do
S[n]:=[[0, 1]];
for k from 1 to nops(S[n-1])-1 do
a:=S[n-1][k][1]+S[n-1][k+1][1];
b:=S[n-1][k][2]+S[n-1][k+1][2];
S[n]:=[op(S[n]), [a, b], S[n-1][k+1]];
od:
lprint(S[n]);
od:
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
N. J. A. Sloane, Nov 21 2017
STATUS
approved