login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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).
0

%I #10 Oct 12 2023 14:10:03

%S 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 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 7,3,14,3,5,4,25,1,18,1,25,2,27,1,16,1,27,2

%N 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 The encoding used here is related to that used for the Doudna sequence (A005940):

%C - 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 - for m = 1, 2, ..., let p be the m-th prime number,

%C - if p neither divides u nor v then we add a 0,

%C - if p divides u with multiplicity e then we add a run of e 1's,

%C - if p divides v with multiplicity e then we add a run of e 2's,

%C - 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 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 The case b = 2 corresponds (up to the offset) to the Doudna sequence (A005940).

%C The sequence n -> T(n, 1) / T(n, 2) runs through all the reduced positive rationals exactly once.

%F T(n, 1) = 1 iff n belongs to A005823.

%F T(n, 2) = 1 iff n belongs to A005836.

%F T(A005836(n), 1) = A005940(n+1).

%F T(A005823(n), 2) = A005940(n+1).

%F A001222(T(n, 1)) = A062756(n).

%F A001222(T(n, 2)) = A081603(n).

%F A001222(T(n, 1) * T(n, 2)) = A160384(n).

%F T(A004488(n), 1) = T(n, 2).

%F T(A004488(n), 2) = T(n, 1).

%F T((3^e - 1)/2, 1) = 2^e for any e >= 0.

%F T(3^e - 1, 2) = 2^e for any e >= 0.

%F T(3^e, 1) = A000040(e + 1) for any e >= 0.

%F T(2 * 3^e, 2) = A000040(e + 1) for any e >= 0.

%F T(3*n, k) = A003961(T(n, k)).

%e Triangle T(n, k) begins (alongside the ternary expansion of n):

%e n n-th row ter(n)

%e -- -------- ------

%e 0 [1, 1] 0

%e 1 [2, 1] 1

%e 2 [1, 2] 2

%e 3 [3, 1] 10

%e 4 [4, 1] 11

%e 5 [3, 2] 12

%e 6 [1, 3] 20

%e 7 [2, 3] 21

%e 8 [1, 4] 22

%e 9 [5, 1] 100

%e 10 [6, 1] 101

%e 11 [5, 2] 102

%e 12 [9, 1] 110

%e 13 [8, 1] 111

%e 14 [9, 2] 112

%e 15 [5, 3] 120

%e 16 [10, 3] 121

%e 17 [3, 4] 122

%o (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 Cf. A000040, A001222, A003961, A004488, A005823, A005836, A005940, A062756, A081603, A160384.

%K nonn,base,tabf

%O 0,3

%A _Rémy Sigrist_, Oct 07 2023