login
Irregular triangle read by rows: T(n,k) is the number of integers greater than 4 such that they have n trits and 2k+1 (k>=1) nonzero trits in their balanced ternary representation, with n>=3 and 1<=k<=(j-1)/2.
2

%I #34 Feb 23 2018 15:43:30

%S 4,12,24,16,40,80,60,240,64,84,560,448,112,1120,1792,256,144,2016,

%T 5376,2304,180,3360,13440,11520,1024,220,5280,29568,42240,11264,264,

%U 7920,59136,126720,67584,4096,312,11440,109824,329472,292864,53248,364,16016,192192

%N Irregular triangle read by rows: T(n,k) is the number of integers greater than 4 such that they have n trits and 2k+1 (k>=1) nonzero trits in their balanced ternary representation, with n>=3 and 1<=k<=(j-1)/2.

%C This is a subset of A013609 and A188440.

%C This sequence T(n,k) can be re-indexed into the form of b(m) where m is positive integer sequence that can be calculated by parametric function m = m(n,k): m(n=2j+1,k) = j^2-j+k, where n is odd and 1<=k<=j.

%C m(n=2j,k) = j^2-2j+1+k, where n is even and 1<=k<=j.

%C Here n is the number of digits of an odd number in balanced ternary representation, and 2k+1 is the number of nonzero trits (1 or T) of the same number in balanced ternary representation.

%H Lei Zhou, <a href="/A277513/b277513.txt">Table of n, a(n) for n = 3..10002</a>

%H Definition of <a href="https://en.wikipedia.org/wiki/Balanced_ternary">Balanced Ternary</a>.

%F T(n,k) = 2^(2k)*Binomial(n-1, 2k)

%e Odd numbers that can be expressed in 3 trits balanced ternary (bt) form are 5 = 1TT, 7 = 1T1, 9 = 100, 11 = 11T, 13 = 111. Among these five numbers, four have 3 nonzero digits, so a(1) = 4.

%e Odd numbers in 4 trits bt form are 15 = 1TT0, 17 = 1T0T, 19 = 1T01, 21 = 1T10, 23 = 10TT, 25 = 10T1, 27 = 1000, 29 = 101T, 31 = 1011, 33 = 11T0, 35 = 110T, 37 = 1101, 39 = 1110. Among these 13 numbers, 12 have 3 nonzero digits, so a(2) = 12.

%e The irregular triangle begins:

%e k=1 2 3 4 5 6 7

%e n=3 4

%e n=4 12

%e n=5 24 16

%e n=6 40 80

%e n=7 60 240 64

%e n=8 84 560 448

%e n=9 112 1120 1792 256

%e n=10 144 2016 5376 2304

%e n=11 180 3360 13440 11520 1024

%e n=12 220 5280 29568 42240 11264

%e n=13 264 7920 59136 126720 67584 4096

%e n=14 312 11440 109824 329472 292864 53248

%e n=15 364 16016 192192 768768 1025024 372736 16384

%e These are the odd columns with the 1st column removed in the table in A013609.

%t a = {}; Do[Do[ct = 2^(2k)*Binomial[n - 1, 2k]; AppendTo[a, ct], {k, 1, Floor[(n-1)/2]}], {n, 3, 15}]; a

%Y Cf. A013609, A188440, A134021, A134022, A134023.

%K base,nonn,tabf

%O 3,1

%A _Lei Zhou_, Oct 18 2016