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.
%I A340620 #20 Mar 14 2021 13:33:28 %S A340620 3,6,6,10,28,10,15,81,81,15,21,186,354,186,21,28,371,1137,1137,371,28, %T A340620 36,672,3018,4836,3018,672,36,45,1134,7023,16374,16374,7023,1134,45, %U A340620 55,1812,14829,47286,68644,47286,14829,1812,55,66,2772,29043,121314,240021,240021,121314,29043,2772,66 %N A340620 T(n,k) is the number of 4-ary strings of length n+1 with k+1 indispensable digits and a nonzero leading digit with 0 <= k <= n. %C A340620 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 the string 33102232, the digits 3, 3, 1, 3, and 2 are indispensable (from the left). %C A340620 T(n,k) is also the number of integers m where the length of base-4 representation of m is n+k and the digit sum of the base-4 representation of 3m is 3(k+1). %H A340620 J. Y. Choi, <a href="http://nntdm.net/volume-25-2019/number-2/40-48/">Indispensable digits for digit sums</a>, Notes on Number Theory and Discrete Mathematics, 25(2), (2019), pp. 40-48. %H A340620 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 A340620 T(n,k) = A330509(n+1,k+1) - A330509(n,k+1). %e A340620 Triangle begins %e A340620 3; %e A340620 6, 6; %e A340620 10, 28, 10; %e A340620 15, 81, 81, 15; %e A340620 21, 186, 354, 186, 21; %e A340620 28, 371, 1137, 1137, 371, 28; %e A340620 36, 672, 3018, 4836, 3018, 672, 36; %e A340620 ... %e A340620 There are 6 4-ary strings (10, 12, 13, 20, 23, 30) of length 2 with 1 indispensable digits and a nonzero leading digit. %e A340620 There are 6 4-ary strings (11, 21, 22, 31, 32, 33) of length 2 with 2 indispensable digits and a nonzero leading digit. %e A340620 There are 10 4-ary strings (111, 211, 221, 222, 311, 321, 322, 331, 332, 333) of length 3 with 3 indispensable digits and a nonzero leading digit. %e A340620 Hence, T(1,0)=6, T(1,1)=6, T(2,2)=10. %o A340620 (PARI) A008287(n, k) = if(n<0, 0, polcoeff((1 + x + x^2 + x^3)^n, k)); %o A340620 A330509(n, k) = A008287(n, 3*k-2)+A008287(n, 3*k-1) + A008287(n, 3*k); %o A340620 T(n, k) = A330509(n+1,k+1) - A330509(n,k+1); %o A340620 tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", "))); \\ _Michel Marcus_, Jan 19 2021 %Y A340620 Cf. A330381, A330509, A330510, A005773, A008287. %K A340620 nonn,base %O A340620 0,1 %A A340620 _Ji Young Choi_, Jan 13 2021 %E A340620 More terms from _Michel Marcus_, Jan 19 2021