cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A352911 Cantor's List: Pairs (i, j) of relatively prime positive integers sorted first by i + j then by i.

This page as a plain text file.
%I A352911 #33 Mar 04 2024 08:48:34
%S A352911 1,1,1,2,2,1,1,3,3,1,1,4,2,3,3,2,4,1,1,5,5,1,1,6,2,5,3,4,4,3,5,2,6,1,
%T A352911 1,7,3,5,5,3,7,1,1,8,2,7,4,5,5,4,7,2,8,1,1,9,3,7,7,3,9,1,1,10,2,9,3,8,
%U A352911 4,7,5,6,6,5,7,4,8,3,9,2,10,1,1,11,5,7,7,5,11,1
%N A352911 Cantor's List: Pairs (i, j) of relatively prime positive integers sorted first by i + j then by i.
%C A352911 a(2*n-1) / a(2*n) is the n-th fraction in Cantor's enumeration of the positive rational numbers. - _Peter Luschny_, Oct 10 2023
%H A352911 N. J. A. Sloane, <a href="/A352911/b352911.txt">Table of n, a(n) for n = 1..9914</a>
%H A352911 Georg Cantor, <a href="http://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN002156806">Ein Beitrag zur Mannigfaltigkeitslehre</a>, Journal für die reine und angewandte Mathematik 84 (1878), 242-258, (p. 250).
%H A352911 N. J. A. Sloane, <a href="/A352911/a352911.txt">List of the 4957 pairs (i,j) with i+j <= 127</a>. [Note this is not a b-file.]
%H A352911 <a href="/index/Ra#rational">Index entries for sequences related to enumerating the rationals</a>
%e A352911 The first few pairs are, seen as an irregular triangle:
%e A352911   [1, 1],
%e A352911   [1, 2], [2, 1],
%e A352911   [1, 3], [3, 1],
%e A352911   [1, 4], [2, 3], [3, 2], [4, 1],
%e A352911   [1, 5], [5, 1],
%e A352911   [1, 6], [2, 5], [3, 4], [4, 3], [5, 2], [6, 1],
%e A352911   [1, 7], [3, 5], [5, 3], [7, 1],
%e A352911   [1, 8], [2, 7], [4, 5], [5, 4], [7, 2], [8, 1],
%e A352911   [1, 9], [3, 7], [7, 3], [9, 1],
%e A352911   ...
%p A352911 CantorsList := proc(upto) local C, F, n, t, count;
%p A352911 C := NULL; count := 0:
%p A352911 for n from 2 while count < upto do
%p A352911     F := select(t -> igcd(t, n-t) = 1, [$1..n-1]);
%p A352911     C := C, seq([t, n - t], t = F);
%p A352911     count := count + nops(F) od:
%p A352911 ListTools:-Flatten([C]) end:
%p A352911 CantorsList(40);  # _Peter Luschny_, Oct 10 2023
%t A352911 A352911row[n_]:=Select[Array[{#,n-#}&,n-1],CoprimeQ[First[#],Last[#]]&];
%t A352911 Array[A352911row,10,2] (* Generates 10 rows *) (* _Paolo Xausa_, Oct 10 2023 *)
%o A352911 (Python)
%o A352911 from math import gcd
%o A352911 from itertools import chain, count, islice
%o A352911 def A352911_gen(): # generator of terms
%o A352911     return chain.from_iterable((i,n-i) for n in count(2) for i in range(1,n) if gcd(i,n-i)==1)
%o A352911 A352911_list = list(islice(A352911_gen(),30)) # _Chai Wah Wu_, Oct 10 2023
%Y A352911 Cf. A352909, A020652 or A038566 (i-coordinates), A020653 (j-coordinates), A366191.
%K A352911 nonn,tabf,easy,look
%O A352911 1,4
%A A352911 _N. J. A. Sloane_, Apr 09 2022