OFFSET
1,6
COMMENTS
The rational numbers in the interval [0, 1] are listed as pairs of relatively prime integers a(2*n-1) / a(2*n).
Start with (0, 1). Then append pairs (t, n - t) where t and n - t are relatively prime positive integers and 1 <= t <= floor(n/2). Sort first by n then by t in ascending order.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..12234
Georg Cantor, Ein Beitrag zur Mannigfaltigkeitslehre, Journal für die reine und angewandte Mathematik 84 (1878), 242-258, (p. 250).
EXAMPLE
Seen as an irregular table:
1: [0, 1],
2: [1, 1],
3: [1, 2],
4: [1, 3],
5: [1, 4], [2, 3],
6: [1, 5],
7: [1, 6], [2, 5], [3, 4],
8: [1, 7], [3, 5],
9: [1, 8], [2, 7], [4, 5],
10: [1, 9], [3, 7],
11: [1, 10], [2, 9], [3, 8], [4, 7], [5, 6],
...
MAPLE
A366191List := proc(upto) local C, F, n, t, count;
C := [0, 1]; count := 0:
for n from 2 while count < upto do
F := select(t -> igcd(t, n - t) = 1, [$1..iquo(n, 2)]);
C := C, seq([t, n - t], t = F);
count := count + nops(F) od;
ListTools:-Flatten([C]) end:
A366191List(40);
MATHEMATICA
A366191row[n_] := If[n == 1, {0, 1}, Select[Array[{#, n - #}&, Floor[n/2]], CoprimeQ[First[#], Last[#]]&]];
Array[A366191row, 20] (* Paolo Xausa, Jan 16 2024 *)
CROSSREFS
KEYWORD
nonn,easy,tabf
AUTHOR
Peter Luschny, Oct 10 2023
STATUS
approved