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.

A330381 Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n.

This page as a plain text file.
%I A330381 #40 Jan 28 2020 01:01:59
%S A330381 1,1,2,1,5,3,1,9,13,4,1,14,35,26,5,1,20,75,96,45,6,1,27,140,267,216,
%T A330381 71,7,1,35,238,623,750,427,105,8,1,44,378,1288,2123,1800,770,148,9,1,
%U A330381 54,570,2436,5211,6046,3858,1296,201,10,1,65,825,4302,11505,17303
%N A330381 Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n.
%C A330381 A digit in a string is called indispensable, if it is greater than the following digit or equal to the following digits which are eventually greater than the following digit.  We also assume that there is an invisible digit 0 at the end of any string.  For example, in 7233355548, the digits 7, 5, 5, 5, and 8 are indispensable.
%C A330381 T(n, k) is also the number of integers m where the length of the ternary representation of m is less than or equal to n and the digit sum of the ternary representation of 2m is 2k.
%H A330381 J. Y. Choi, <a href="https://doi.org/10.7546/nntdm.2019.25.2.40-48">Indispensable digits for digit sums</a>, Notes Number Theory Discrete Math 25 (2019), pp. 40-48.
%H A330381 J. Y. Choi, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL22/Choi/choi15.html">Digit sums generalizing binomial coefficients</a>, J. Integer Seq. 22 (2019), Article 19.8.3.
%F A330381 T(n, k) = A027907(n, 2k-1) + A027907(n, 2k).
%e A330381 Triangle begins
%e A330381   1;
%e A330381   1,  2;
%e A330381   1,  5,  3;
%e A330381   1,  9, 13,  4;
%e A330381   1, 14, 35, 26,  5;
%e A330381   1, 20, 75, 96, 45, 6;
%e A330381   ...
%e A330381 There is 1 string (00) of length 2 with 0 indispensable digits.
%e A330381 There are 5 strings (01, 02, 10, 20, 12) of length 2 with 1 indispensable digit.
%e A330381 There are 3 strings (11, 21, 22) of length 2 with 2 indispensable digits.
%e A330381 Hence T(2, 0) = 1, T(2, 1) = 5, T(2, 2) = 3.
%t A330381 Table[Total@ Map[Sum[Binomial[n, i] Binomial[n - i, # - 2 i], {i, 0, n}] &, 2 k + {-1, 0}], {n, 0, 10}, {k, 0, n}] // Flatten (* _Michael De Vlieger_, Dec 23 2019, after _Adi Dani_ at A027907 *)
%o A330381 (PARI) A027907(n, k) = if(n<0, 0, polcoeff((1 + x + x^2)^n, k));
%o A330381 T(n, k) = A027907(n, 2*k-1) + A027907(n, 2*k); \\ _Jinyuan Wang_, Dec 14 2019
%Y A330381 Cf. A027907, A330509.
%K A330381 nonn,base,tabl
%O A330381 0,3
%A A330381 _Ji Young Choi_, Dec 12 2019
%E A330381 More terms from _Jinyuan Wang_, Dec 14 2019