login
A280073
Numerator of Farey fractions sorted according to increasing k, with k = numerator + denominator. Fractions with same k are sorted in order of increasing denominator.
3
0, 1, 1, 1, 2, 1, 1, 3, 2, 1, 3, 1, 4, 2, 1, 3, 1, 5, 4, 3, 2, 1, 5, 1, 6, 5, 4, 3, 2, 1, 5, 3, 1, 7, 4, 2, 1, 7, 5, 3, 1, 8, 7, 6, 5, 4, 3, 2, 1, 7, 5, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 3, 1, 10, 8, 5, 4, 2, 1, 9, 7, 5, 3, 1, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 7, 5, 1, 12, 11, 9, 8, 7, 6, 4, 3, 2, 1, 11, 9, 7
OFFSET
1,5
COMMENTS
The parameter k is the Manhattan distance of the corresponding points to the origin in the "denominator, numerator" representation space.
The fractions in order begin: 0/1, 1/1, 1/2, 1/3, 2/3, 1/4, 1/5, 3/4, 2/5, 1/6, 3/5, 1/7, 4/5, 2/7, 1/8, ..., .
Note that the fraction 2/4 is not in the above since it can be reduced to 1/2.
MATHEMATICA
nmax = 25;
(* fracs are fractions represented in the triangle with vertices
(0, 1), (1, nmax) and (nmax, nmax) *)
fracs = Sort@Union@Flatten@Table[a/b, {b, nmax}, {a, 0, b}];
(* Sorting generated fractions according to increasing Manhattan distance first, and then by increasing denominator *)
fracsorted =
SortBy[fracs, {Numerator@# + Denominator@# &, Denominator@# &}];
nmaxlimit = Floor[(1/6)* nmax^2]; (* Safe limit for a correctly sorted sequence since asymptotically half of the generated fractions can be properly sorted according to Manhattan distance *)
Take[Numerator@fracsorted, nmaxlimit]
CROSSREFS
Sequence in context: A324830 A141110 A325758 * A327523 A190770 A292149
KEYWORD
nonn,frac
AUTHOR
STATUS
approved