cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A251729 Number of gap-free but not complete compositions of n.

This page as a plain text file.
%I A251729 #19 Jan 26 2021 16:21:19
%S A251729 0,1,1,2,3,3,6,6,14,12,27,33,58,86,134,210,323,539,810,1371,2044,3510,
%T A251729 5263,8927,13702,22870,35821,58750,93343,152236,243244,395078,634342,
%U A251729 1027876,1656543,2676693,4325727,6982440,11299457,18232217,29518334,47641410
%N A251729 Number of gap-free but not complete compositions of n.
%C A251729 A composition is gap-free but not complete if all integers in the interval defined by the smallest and the largest part are parts but 1 is not a part.
%H A251729 Alois P. Heinz, <a href="/A251729/b251729.txt">Table of n, a(n) for n = 1..1000</a>
%H A251729 Alois P. Heinz, <a href="/A251729/a251729.jpg">Plot of (a(n)+a(n+1)-a(n+2))/a(n+2) for n = 150..1000</a>
%H A251729 P. Hitczenko and A. Knopfmacher, <a href="http://dx.doi.org/10.1016/j.disc.2005.02.008">Gap-free compositions and gap-free samples of geometric random variables</a>, Discrete Math., 294 (2005), 225-239.
%F A251729 a(n) = A107428(n) - A107429(n).
%F A251729 lim_{n -> oo} a(n)/a(n-1) = (1+sqrt(5))/2 = phi = A001622.
%e A251729 a(6) = 3: [6], [3,3], [2,2,2].
%e A251729 a(7) = 6: [7], [3,4], [4,3], [2,2,3], [2,3,2], [3,2,2].
%p A251729 b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, 0, t!),
%p A251729      `if`(i<1 or n<i, 0, add(b(n-i*j, i-1, t+j)/j!, j=1..n/i)))
%p A251729     end:
%p A251729 a:= n-> add(b(n, i, 0), i=1..n):
%p A251729 seq(a(n), n=1..50);
%t A251729 b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[i == 0, 0, t!], If[i < 1 || n < i, 0, Sum[b[n - i*j, i - 1, t + j]/j!, {j, 1, n/i}]]];
%t A251729 a[n_] := Sum[b[n, i, 0], {i, 1, n}];
%t A251729 Array[a, 50] (* _Jean-François Alcover_, Jan 25 2021, after _Alois P. Heinz_ *)
%Y A251729 Cf. A001622, A034296, A107428, A107429, A188575, A238353, A264396.
%K A251729 nonn
%O A251729 1,4
%A A251729 _Alois P. Heinz_, Dec 07 2014