OFFSET
0,4
LINKS
Alois P. Heinz, Rows n = 0..200, flattened
FORMULA
T(n, k) = 2*n - wt(n-k) - wt(k) where wt = A000120 is the binary weight. - Kevin Ryde, Jan 29 2022
EXAMPLE
Triangle T(n,k) (with rows n >= 0 and columns k >= 0) begins as follows:
0;
1, 1;
3, 2, 3;
4, 4, 4, 4;
7, 5, 6, 5, 7;
8, 8, 7, 7, 8, 8;
10, 9, 10, 8, 10, 9, 10;
...
MAPLE
T:= n-> (p-> seq(padic[ordp](denom(coeff(p, x, i)), 2)
, i=0..2*n, 2))(orthopoly[P](2*n, x)):
seq(T(n), n=0..12); # Alois P. Heinz, Jan 25 2022
MATHEMATICA
T[n_, k_] := IntegerExponent[Denominator[Coefficient[LegendreP[2n, x], x, 2k]], 2]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 28 2017 *)
PROG
(PARI) {T(n, k) = if( k<0 || k>n, 0, -valuation( polcoeff( pollegendre(2*n), 2*k), 2))}
(PARI) T(n, k) = 2*n - hammingweight(n-k) - hammingweight(k); \\ Kevin Ryde, Jan 29 2022
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Michael Somos, Oct 25 2002
STATUS
approved