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).
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, 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, 7, 3, 14, 3, 5, 4, 25, 1, 18, 1, 25, 2, 27, 1, 16, 1, 27, 2
Offset: 0
Examples
Triangle T(n, k) begins (alongside the ternary expansion of n): n n-th row ter(n) -- -------- ------ 0 [1, 1] 0 1 [2, 1] 1 2 [1, 2] 2 3 [3, 1] 10 4 [4, 1] 11 5 [3, 2] 12 6 [1, 3] 20 7 [2, 3] 21 8 [1, 4] 22 9 [5, 1] 100 10 [6, 1] 101 11 [5, 2] 102 12 [9, 1] 110 13 [8, 1] 111 14 [9, 2] 112 15 [5, 3] 120 16 [10, 3] 121 17 [3, 4] 122
Crossrefs
Programs
-
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); }
Formula
T(n, 1) = 1 iff n belongs to A005823.
T(n, 2) = 1 iff n belongs to A005836.
T(A004488(n), 1) = T(n, 2).
T(A004488(n), 2) = T(n, 1).
T((3^e - 1)/2, 1) = 2^e for any e >= 0.
T(3^e - 1, 2) = 2^e for any e >= 0.
T(3^e, 1) = A000040(e + 1) for any e >= 0.
T(2 * 3^e, 2) = A000040(e + 1) for any e >= 0.
T(3*n, k) = A003961(T(n, k)).
Comments