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.

A366192 Pairs (i, j) of noncoprime positive integers sorted first by i + j then by i.

This page as a plain text file.
%I A366192 #25 Jan 28 2024 10:52:33
%S A366192 2,2,2,4,3,3,4,2,2,6,4,4,6,2,3,6,6,3,2,8,4,6,5,5,6,4,8,2,2,10,3,9,4,8,
%T A366192 6,6,8,4,9,3,10,2,2,12,4,10,6,8,7,7,8,6,10,4,12,2,3,12,5,10,6,9,9,6,
%U A366192 10,5,12,3,2,14,4,12,6,10,8,8,10,6,12,4,14,2
%N A366192 Pairs (i, j) of noncoprime positive integers sorted first by i + j then by i.
%C A366192 The rows of A290600 interleaved term by term with the reversed rows of A290600. - _Peter Munn_, Jan 28 2024
%H A366192 Paolo Xausa, <a href="/A366192/b366192.txt">Table of n, a(n) for n = 1..9886</a>
%e A366192 The first few pairs are, seen as an irregular triangle (where rows with a prime index are empty (and are therefore missing)):
%e A366192   [2,  2],
%e A366192   [2,  4], [3,  3], [4, 2],
%e A366192   [2,  6], [4,  4], [6, 2],
%e A366192   [3,  6], [6,  3],
%e A366192   [2,  8], [4,  6], [5, 5], [6, 4], [ 8, 2],
%e A366192   [2, 10], [3,  9], [4, 8], [6, 6], [ 8, 4], [ 9, 3], [10, 2],
%e A366192   [2, 12], [4, 10], [6, 8], [7, 7], [ 8, 6], [10, 4], [12, 2],
%e A366192   [3, 12], [5, 10], [6, 9], [9, 6], [10, 5], [12, 3],
%e A366192   ...
%e A366192 There are A016035(n) pairs in row n.
%p A366192 aList := proc(upto) local F, P, n, t, count;
%p A366192 P := NULL; count := 0:
%p A366192 for n from 2 while count < upto do
%p A366192     F := select(t -> igcd(t, n - t) <> 1, [$1..n-1]);
%p A366192     P := P, seq([t, n - t], t = F);
%p A366192     count := count + nops([F]) od:
%p A366192 ListTools:-Flatten([P]) end:
%p A366192 aList(16);
%t A366192 A366192row[n_]:=Select[Array[{#,n-#}&,n-1],!CoprimeQ[First[#],Last[#]]&];
%t A366192 Array[A366192row,20,2] (* _Paolo Xausa_, Nov 28 2023 *)
%o A366192 (Python)
%o A366192 from math import gcd
%o A366192 from itertools import chain, count, islice
%o A366192 def A366192_gen(): # generator of terms
%o A366192     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 A366192 A366192_list = list(islice(A366192_gen(),30)) # _Chai Wah Wu_, Oct 10 2023
%Y A366192 Cf. A016035, A290600 (first bisection), A352911 (complement).
%K A366192 nonn,look,tabf,easy
%O A366192 1,1
%A A366192 _Peter Luschny_, Oct 10 2023