- Let $f(n)$ be an arbitrary function.
- Let $\operatorname{wt}(n)$ be A000120 (i.e., number of ones in the binary expansion of $n$). Here $$ \operatorname{wt}(2n+1) = \operatorname{wt}(n) + 1, \\ \operatorname{wt}(2n) = \operatorname{wt}(n), \\ \operatorname{wt}(0) = 0. $$
- Let $a(n)$ be an integer sequence such that $$ a(2^m(2k+1)) = \sum\limits_{j=0}^{m}f(m-j)a(2^j k), \\ a(0) = 1. $$
- Let $T(n, k)$ be an integer coefficients such that $$ T(n,k) = \sum\limits_{i=0}^{2^n-1}[\operatorname{wt}(i)=k]a(i). $$ Here square bracket denotes Iverson bracket.
Here is the explanation how to make row sums equal to the terms of an arbitrary given sequence:
- Let $b(n)$ be an arbitrary sequence with $b(0)=1$.
To calculate $f(n)$ for it, use the following: $$ s(n,m) = \sum\limits_{j=0}^{2^n-1} a(2^m j), \\ s(n,m) = s(n+1, m-1) - \sum\limits_{k=0}^{m-1}f(m-k-1)s(n,k), \\ s(n,0) = b(n), s(0,m) = 1, \\ f(n) = s(1, n) - 1 - \sum\limits_{k=0}^{n-1}f(k). $$
I am interested in the simplest way to generate $T(n,k)$. I am also interested in representing the sequence $T(n+k,n)$ for fixed $k$ and variable $n$ as a polynomial $P_k(n)$ of degree $k$. Here we are need condition $f(0)=1$ to make $T(n,n)=1$ and make $P_k(n)$ an ordinary polynomial (without having to multiply it by a fixed number to the power of $n$).