OFFSET
0,3
COMMENTS
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.
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.
LINKS
J. Y. Choi, Indispensable digits for digit sums, Notes Number Theory Discrete Math 25 (2019), pp. 40-48.
J. Y. Choi, Digit sums generalizing binomial coefficients, J. Integer Seq. 22 (2019), Article 19.8.3.
EXAMPLE
Triangle begins
1;
1, 2;
1, 5, 3;
1, 9, 13, 4;
1, 14, 35, 26, 5;
1, 20, 75, 96, 45, 6;
...
There is 1 string (00) of length 2 with 0 indispensable digits.
There are 5 strings (01, 02, 10, 20, 12) of length 2 with 1 indispensable digit.
There are 3 strings (11, 21, 22) of length 2 with 2 indispensable digits.
Hence T(2, 0) = 1, T(2, 1) = 5, T(2, 2) = 3.
MATHEMATICA
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 *)
PROG
(PARI) A027907(n, k) = if(n<0, 0, polcoeff((1 + x + x^2)^n, k));
CROSSREFS
KEYWORD
AUTHOR
Ji Young Choi, Dec 12 2019
EXTENSIONS
More terms from Jinyuan Wang, Dec 14 2019
STATUS
approved