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.

A343836 Array T(n, k), n, k > 0, read by antidiagonals; the balanced ternary representation of T(n, k) is obtained by adding componentwise (i.e., without carries) the digits in the balanced ternary representations of n and of k.

This page as a plain text file.
%I A343836 #13 Aug 09 2022 11:01:22
%S A343836 0,1,1,2,-1,2,3,3,3,3,4,4,-2,4,4,5,2,-4,-4,2,5,6,6,-3,-3,-3,6,6,7,7,
%T A343836 10,-2,-2,10,7,7,8,5,8,8,-4,8,8,5,8,9,9,9,9,9,9,9,9,9,9,10,10,13,10,
%U A343836 10,-5,10,10,13,10,10,11,8,11,11,8,-7,-7,8,11,11,8,11
%N A343836 Array T(n, k), n, k > 0, read by antidiagonals; the balanced ternary representation of T(n, k) is obtained by adding componentwise (i.e., without carries) the digits in the balanced ternary representations of n and of k.
%C A343836 This sequence is similar to A003987 and to A004489.
%C A343836 We use the following table to combine individual digits (this is the balanced ternary addition table read mod 3):
%C A343836          | T 0 1
%C A343836       ---+-------
%C A343836        T | 1 T 0
%C A343836        0 | T 0 1
%C A343836        1 | 0 1 T
%H A343836 Rémy Sigrist, <a href="/A343836/b343836.txt">Table of n, a(n) for n = 0..10010</a>
%H A343836 Rémy Sigrist, <a href="/A343836/a343836.png">Colored representation of the table for n, k < 1094</a> (blue denotes negative values, red denotes positive values, dark colors correspond to small values in absolute value)
%H A343836 Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_ternary#Addition,_subtraction_and_multiplication_and_division">Balanced ternary: Addition, subtraction and multiplication and division</a>
%F A343836 T(n, k) = T(k, n).
%F A343836 T(m, T(n, k)) = T(T(m, n), k).
%F A343836 T(n, 0) = n.
%F A343836 T(n, n) = -n.
%e A343836 Array T(n, k) begins:
%e A343836   n\k|   0   1   2   3   4    5    6    7    8    9   10   11   12   13
%e A343836   ---+-----------------------------------------------------------------
%e A343836     0|   0   1   2   3   4    5    6    7    8    9   10   11   12   13
%e A343836     1|   1  -1   3   4   2    6    7    5    9   10    8   12   13   11
%e A343836     2|   2   3  -2  -4  -3   10    8    9   13   11   12    7    5    6
%e A343836     3|   3   4  -4  -3  -2    8    9   10   11   12   13    5    6    7
%e A343836     4|   4   2  -3  -2  -4    9   10    8   12   13   11    6    7    5
%e A343836     5|   5   6  10   8   9   -5   -7   -6  -11  -13  -12   -8  -10   -9
%e A343836     6|   6   7   8   9  10   -7   -6   -5  -13  -12  -11  -10   -9   -8
%e A343836     7|   7   5   9  10   8   -6   -5   -7  -12  -11  -13   -9   -8  -10
%e A343836     8|   8   9  13  11  12  -11  -13  -12   -8  -10   -9   -5   -7   -6
%e A343836     9|   9  10  11  12  13  -13  -12  -11  -10   -9   -8   -7   -6   -5
%e A343836    10|  10   8  12  13  11  -12  -11  -13   -9   -8  -10   -6   -5   -7
%e A343836    11|  11  12   7   5   6   -8  -10   -9   -5   -7   -6  -11  -13  -12
%e A343836    12|  12  13   5   6   7  -10   -9   -8   -7   -6   -5  -13  -12  -11
%e A343836    13|  13  11   6   7   5   -9   -8  -10   -6   -5   -7  -12  -11  -13
%e A343836 Array T(n, k) begins in balanced ternary:
%e A343836   n\k|    0    1   1T   10   11  1TT  1T0  1T1  10T  100  101  11T  110  111
%e A343836   ---+----------------------------------------------------------------------
%e A343836     0|    0    1   1T   10   11  1TT  1T0  1T1  10T  100  101  11T  110  111
%e A343836     1|    1    T   10   11   1T  1T0  1T1  1TT  100  101  10T  110  111  11T
%e A343836    1T|   1T   10   T1   TT   T0  101  10T  100  111  11T  110  1T1  1TT  1T0
%e A343836    10|   10   11   TT   T0   T1  10T  100  101  11T  110  111  1TT  1T0  1T1
%e A343836    11|   11   1T   T0   T1   TT  100  101  10T  110  111  11T  1T0  1T1  1TT
%e A343836   1TT|  1TT  1T0  101  10T  100  T11  T1T  T10  TT1  TTT  TT0  T01  T0T  T00
%e A343836   1T0|  1T0  1T1  10T  100  101  T1T  T10  T11  TTT  TT0  TT1  T0T  T00  T01
%e A343836   1T1|  1T1  1TT  100  101  10T  T10  T11  T1T  TT0  TT1  TTT  T00  T01  T0T
%e A343836   10T|  10T  100  111  11T  110  TT1  TTT  TT0  T01  T0T  T00  T11  T1T  T10
%e A343836   100|  100  101  11T  110  111  TTT  TT0  TT1  T0T  T00  T01  T1T  T10  T11
%e A343836   101|  101  10T  110  111  11T  TT0  TT1  TTT  T00  T01  T0T  T10  T11  T1T
%e A343836   11T|  11T  110  1T1  1TT  1T0  T01  T0T  T00  T11  T1T  T10  TT1  TTT  TT0
%e A343836   110|  110  111  1TT  1T0  1T1  T0T  T00  T01  T1T  T10  T11  TTT  TT0  TT1
%e A343836   111|  111  11T  1T0  1T1  1TT  T00  T01  T0T  T10  T11  T1T  TT0  TT1  TTT
%o A343836 (PARI) T(n,k,c=v->centerlift(Mod(v,3))) = { if (n==0 && k==0, return (0), my (d=c(n), t=c(k)); c(d+t)+3*T((n-d)/3, (k-t)/3)) }
%Y A343836 Cf. A003987, A004489, A343316.
%K A343836 sign,tabl,base
%O A343836 0,4
%A A343836 _Rémy Sigrist_, May 01 2021