OFFSET
1,1
COMMENTS
EXAMPLE
The first fractions are 2/3, 2/5, 3/5, 2/7, 3/7, ... with increasing k = 5,7,8,9,10,... respectively, then first terms are the corresponding denominators, 3,5,5,7,7,...
MATHEMATICA
nmax=125;
(* fracs are fractions represented in the triangle with vertices (2, 3), (2, prime(nmax)) and (prime(nmax), prime(nmax)) *)
fracs=Sort@Flatten@Table[Prime[a]/Prime[b], {b, 2, nmax}, {a, 1, b-1}];
(* 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[Denominator@fracsorted, nmaxlimit]
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Andres Cicuttin, Apr 22 2019
STATUS
approved