OFFSET
1,4
COMMENTS
a(n+1) is the number of compositions n=p(1)+p(2)+...+p(m) with p(1)=1 and p(k) <= 4*p(k+1), see example. [Joerg Arndt, Dec 18 2012]
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
Christian Elsholtz, Clemens Heuberger, Daniel Krenn, Algorithmic counting of nonequivalent compact Huffman codes, arXiv:1901.11343 [math.CO], 2019.
Christian Elsholtz, Clemens Heuberger, Helmut Prodinger, The number of Huffman codes, compact trees, and sums of unit fractions, arXiv:1108.5964v1 [math.CO], Aug 30, 2011. Also IEEE Trans. Information Theory, Vol. 59, No. 2, 2013 pp. 1065-1075.
FORMULA
a(n) = A294775(n-1,3). - Alois P. Heinz, Nov 08 2017
EXAMPLE
From Joerg Arndt, Dec 18 2012: (Start)
There are a(6+1)=15 compositions 6=p(1)+p(2)+...+p(m) with p(1)=1 and p(k) <= 4*p(k+1):
[ 1] [ 1 1 1 1 1 1 ]
[ 2] [ 1 1 1 1 2 ]
[ 3] [ 1 1 1 2 1 ]
[ 4] [ 1 1 1 3 ]
[ 5] [ 1 1 2 1 1 ]
[ 6] [ 1 1 2 2 ]
[ 7] [ 1 1 3 1 ]
[ 8] [ 1 1 4 ]
[ 9] [ 1 2 1 1 1 ]
[10] [ 1 2 1 2 ]
[11] [ 1 2 2 1 ]
[12] [ 1 2 3 ]
[13] [ 1 3 1 1 ]
[14] [ 1 3 2 ]
[15] [ 1 4 1 ]
(End)
MATHEMATICA
b[n_, r_, k_] := b[n, r, k] = If[n < r, 0, If[r == 0, If[n == 0, 1, 0], Sum[b[n-j, k*(r-j), k], {j, 0, Min[n, r]}]]];
a[n_] := b[3n-2, 1, 4];
Array[a, 40] (* Jean-François Alcover, Jul 21 2018, after Alois P. Heinz *)
PROG
(PARI)
/* g.f. as given in the Elsholtz/Heuberger/Prodinger reference */
N=66; q='q+O('q^N);
L=2 + 2*ceil( log(N) / log(t) );
f(k) = (1-t^k)/(1-t);
la(j) = prod(i=1, j, q^f(i) / ( 1 - q^f(i) ) );
nm=sum(j=0, L, (-1)^j * q^f(j) * la(j) );
dn=sum(j=0, L, (-1)^j * la(j) );
gf = nm / dn;
Vec( gf )
/* Joerg Arndt, Dec 27 2012 */
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 07 2010
EXTENSIONS
Added terms beyond a(13)=848, Joerg Arndt, Dec 18 2012
STATUS
approved