%I #11 Jul 20 2017 08:33:15
%S 1,1,2,3,3,4,5,4,5,6,5,7,5,7,8,7,9,6,7,8,9,10,7,11,7,8,9,10,11,12,9,
%T 11,13,8,11,13,14,9,11,13,15,9,10,11,12,13,14,15,16,11,13,17,10,11,12,
%U 13,14,15,16,17,18,11,13,17,19,11,13,16,17,19,20,13,15,17,19,21,12,13,14,15,16,17
%N Denominator of Farey fractions sorted according to increasing k, with k = numerator + denominator. Fractions with same k are sorted in order of increasing denominator.
%C The parameter k is the Manhattan distance of the corresponding points to the origin in the "denominator, numerator" representation space.
%C 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, ..., .
%C Note that the fraction 2/4 is not in the above since it can be reduced to 1/2.
%t nmax = 25;
%t (* fracs are fractions represented in the triangle with vertices
%t (0, 1), (1, nmax) and (nmax, nmax) *)
%t fracs = Sort@Union@Flatten@Table[a/b, {b, nmax}, {a, 0, b}];
%t (* Sorting generated fractions according to increasing Manhattan distance first, and then by increasing denominator *)
%t fracsorted =
%t SortBy[fracs, {Numerator@# + Denominator@# &, Denominator@# &}];
%t 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 *)
%t Take[Denominator@fracsorted, nmaxlimit]
%Y Cf. A280073, A279782, A279783.
%K nonn,frac
%O 1,3
%A _Robert G. Wilson v_ and _Andres Cicuttin_, Dec 31 2016