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.
%I A366344 #10 Oct 12 2023 14:10:03 %S A366344 1,1,2,1,1,2,3,1,4,1,3,2,1,3,2,3,1,4,5,1,6,1,5,2,9,1,8,1,9,2,5,3,10,3, %T A366344 3,4,1,5,2,5,1,6,3,5,4,3,3,10,1,9,2,9,1,8,7,1,10,1,7,2,15,1,12,1,15,2, %U A366344 7,3,14,3,5,4,25,1,18,1,25,2,27,1,16,1,27,2 %N A366344 Irregular triangle T(n, k), n >= 0, k = 1 or 2, read by rows; the n-th row contains two coprime positive integers whose prime factorizations are encoded in the ternary expansion of n (see Comments section for precise definition). %C A366344 The encoding used here is related to that used for the Doudna sequence (A005940): %C A366344 - for any pair (u, v) of coprime positive integers, the ternary expansion of the unique n >= 0 such that T(n, 1) = u and T(n, 2) = v is built as follows (from right to left): %C A366344 - for m = 1, 2, ..., let p be the m-th prime number, %C A366344 - if p neither divides u nor v then we add a 0, %C A366344 - if p divides u with multiplicity e then we add a run of e 1's, %C A366344 - if p divides v with multiplicity e then we add a run of e 2's, %C A366344 - we also insert an extra 0 between pairs of runs of 1's not separated by 2's and between pairs of runs of 2's not separated by 1's. %C A366344 This encoding can be applied to any fixed base b >= 2 and will yield a bijection from the nonnegative integers to the set of tuples of b-1 pairwise coprime positive integers. %C A366344 The case b = 2 corresponds (up to the offset) to the Doudna sequence (A005940). %C A366344 The sequence n -> T(n, 1) / T(n, 2) runs through all the reduced positive rationals exactly once. %F A366344 T(n, 1) = 1 iff n belongs to A005823. %F A366344 T(n, 2) = 1 iff n belongs to A005836. %F A366344 T(A005836(n), 1) = A005940(n+1). %F A366344 T(A005823(n), 2) = A005940(n+1). %F A366344 A001222(T(n, 1)) = A062756(n). %F A366344 A001222(T(n, 2)) = A081603(n). %F A366344 A001222(T(n, 1) * T(n, 2)) = A160384(n). %F A366344 T(A004488(n), 1) = T(n, 2). %F A366344 T(A004488(n), 2) = T(n, 1). %F A366344 T((3^e - 1)/2, 1) = 2^e for any e >= 0. %F A366344 T(3^e - 1, 2) = 2^e for any e >= 0. %F A366344 T(3^e, 1) = A000040(e + 1) for any e >= 0. %F A366344 T(2 * 3^e, 2) = A000040(e + 1) for any e >= 0. %F A366344 T(3*n, k) = A003961(T(n, k)). %e A366344 Triangle T(n, k) begins (alongside the ternary expansion of n): %e A366344 n n-th row ter(n) %e A366344 -- -------- ------ %e A366344 0 [1, 1] 0 %e A366344 1 [2, 1] 1 %e A366344 2 [1, 2] 2 %e A366344 3 [3, 1] 10 %e A366344 4 [4, 1] 11 %e A366344 5 [3, 2] 12 %e A366344 6 [1, 3] 20 %e A366344 7 [2, 3] 21 %e A366344 8 [1, 4] 22 %e A366344 9 [5, 1] 100 %e A366344 10 [6, 1] 101 %e A366344 11 [5, 2] 102 %e A366344 12 [9, 1] 110 %e A366344 13 [8, 1] 111 %e A366344 14 [9, 2] 112 %e A366344 15 [5, 3] 120 %e A366344 16 [10, 3] 121 %e A366344 17 [3, 4] 122 %o A366344 (PARI) row(n, b = 3) = { my (r = vector(b-1, d, 1), g = 0, t = 0); while (n, my (d = n % b); n \= b; g++; if (d, my (e = 1); while (n % b == d, e++; n \= b;); if (t==d, g--, t = d); r[d] *= prime(g)^e;);); return (r); } %Y A366344 Cf. A000040, A001222, A003961, A004488, A005823, A005836, A005940, A062756, A081603, A160384. %K A366344 nonn,base,tabf %O A366344 0,3 %A A366344 _Rémy Sigrist_, Oct 07 2023