login
Triangle read by rows: T(n,k) (n >= 0, 0 <= k <= n) = number of partitions of n into exactly k powers of 2.
13

%I #21 May 01 2023 12:58:50

%S 1,0,1,0,1,1,0,0,1,1,0,1,1,1,1,0,0,1,1,1,1,0,0,1,2,1,1,1,0,0,0,1,2,1,

%T 1,1,0,1,1,1,2,2,1,1,1,0,0,1,1,1,2,2,1,1,1,0,0,1,2,2,2,2,2,1,1,1,0,0,

%U 0,1,2,2,2,2,2,1,1,1,0,0,1,2,2,3,3,2,2,2,1,1,1,0,0,0,1,2,2,3,3,2,2,2,1,1,1

%N Triangle read by rows: T(n,k) (n >= 0, 0 <= k <= n) = number of partitions of n into exactly k powers of 2.

%D J. Jordan and R. Southwell, Further Properties of Reproducing Graphs, Applied Mathematics, Vol. 1 No. 5, 2010, pp. 344-350. doi: 10.4236/am.2010.15045. - From _N. J. A. Sloane_, Feb 03 2013

%H Alois P. Heinz, <a href="/A089052/b089052.txt">Rows n = 0..200, flattened</a>

%H J. Jordan and R. Southwell, <a href="http://dx.doi.org/10.4236/am.2010.15045">Further Properties of Reproducing Graphs</a>, Applied Mathematics, Vol. 1 No. 5, 2010, pp. 344-350. doi: 10.4236/am.2010.15045. - From _N. J. A. Sloane_, Feb 03 2013

%F T(2m, k) = T(m, k)+T(2m-1, k-1); T(2m+1, k) = T(2m, k-1).

%F G.f.: 1/Product_{k>=0} (1-y*x^(2^k)). - _Vladeta Jovovic_, Dec 03 2003

%e 1

%e 0 1

%e 0 1 1

%e 0 0 1 1

%e 0 1 1 1 1

%e 0 0 1 1 1 1

%e 0 0 1 2 1 1 1

%e 0 0 0 1 2 1 1 1

%e 0 1 1 1 2 2 1 1 1

%e 0 0 1 1 1 2 2 1 1 1

%e 0 0 1 2 2 2 2 2 1 1 1

%e 0 0 0 1 2 2 2 2 2 1 1 1

%p A089052 := proc(n, k)

%p option remember;

%p if k > n then

%p return(0);

%p end if;

%p if k= 0 then

%p if n=0 then

%p return(1)

%p else

%p return(0);

%p end if;

%p end if;

%p if n mod 2 = 1 then

%p return procname(n-1, k-1);

%p end if;

%p procname(n-1, k-1)+procname(n/2, k);

%p end proc:

%t t[n_, k_] := t[n, k] = Which[k > n, 0, k == 0, If[n == 0, 1, 0], Mod[n, 2] == 1, t[n-1, k-1], True, t[n-1, k-1] + t[n/2, k]]; Table[t[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Jan 14 2014, after Maple *)

%Y Columns give A036987, A075897 (essentially), A089049, A089050, A089051, A319922.

%Y Row sums give A018819.

%Y See A089053 for another version.

%K nonn,tabl

%O 0,25

%A _N. J. A. Sloane_, Dec 03 2003