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.
%I A107428 #44 Jun 09 2024 09:07:22 %S A107428 1,2,4,6,11,21,39,71,141,276,542,1070,2110,4189,8351,16618,33134, %T A107428 66129,131937,263483,526453,1051984,2102582,4203177,8403116,16800894, %U A107428 33593742,67174863,134328816,268624026,537192064,1074288649,2148414285,4296543181,8592585289 %N A107428 Number of gap-free compositions of n. %C A107428 A gap-free composition contains all the parts between its smallest and largest part. a(5)=11 because we have: 5, 3+2, 2+3, 2+2+1, 2+1+2, 1+2+2, 2+1+1+1, 1+2+1+1, 1+1+2+1, 1+1+1+2, 1+1+1+1+1. - _Geoffrey Critzer_, Apr 13 2014 %H A107428 Alois P. Heinz, <a href="/A107428/b107428.txt">Table of n, a(n) for n = 1..1000</a> %H A107428 Alois P. Heinz, <a href="/A107428/a107428.jpg">Plot of (a(n)-2^(n-2))/2^(n-2) for n = 42..1000</a> %H A107428 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 A107428 a(n) ~ 2^(n-2). - _Alois P. Heinz_, Dec 07 2014 %F A107428 G.f.: Sum_{j>0} Sum_{k>=j} C({j..k},x) where C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/(1 - Sum_{i in {s}} (x^i)) is the g.f. for compositions such that the set of parts equals {s} with C({},x) = 1. - _John Tyler Rascoe_, Jun 01 2024 %e A107428 From _Gus Wiseman_, Oct 04 2022: (Start) %e A107428 The a(0) = 1 through a(5) = 11 gap-free compositions: %e A107428 () (1) (2) (3) (4) (5) %e A107428 (11) (12) (22) (23) %e A107428 (21) (112) (32) %e A107428 (111) (121) (122) %e A107428 (211) (212) %e A107428 (1111) (221) %e A107428 (1112) %e A107428 (1121) %e A107428 (1211) %e A107428 (2111) %e A107428 (11111) %e A107428 (End) %p A107428 b:= proc(n, i, t) option remember; `if`(n=0, t!, %p A107428 `if`(i<1 or n<i, 0, add(b(n-i*j, i-1, t+j)/j!, j=1..n/i))) %p A107428 end: %p A107428 a:= n-> add(b(n, i, 0), i=1..n): %p A107428 seq(a(n), n=1..40); # _Alois P. Heinz_, Apr 14 2014 %t A107428 Table[Length[Select[Level[Map[Permutations,IntegerPartitions[n]],{2}],Length[Union[#]]==Max[#]-Min[#]+1&]],{n,1,20}] (* _Geoffrey Critzer_, Apr 13 2014 *) %t A107428 b[n_, i_, t_] := b[n, i, t] = If[n == 0, t!, If[i < 1 || n < i, 0, Sum[b[n - i*j, i - 1, t + j]/j!, {j, 1, n/i}]]]; a[n_] := Sum[b[n, i, 0], {i, 1, n}]; Table[a[n], {n, 1, 40}] (* _Jean-François Alcover_, Aug 30 2016, after _Alois P. Heinz_ *) %Y A107428 The unordered version (partitions) is A034296, ranked by A073491. %Y A107428 The initial case is A107429, unordered A000009, ranked by A333217. %Y A107428 The unordered complement is counted by A239955, ranked by A073492. %Y A107428 These compositions are ranked by A356841. %Y A107428 The complement is counted by A356846, ranked by A356842 %Y A107428 A356230 ranks gapless factorization lengths, firsts A356603. %Y A107428 A356233 counts factorizations into gapless numbers. %Y A107428 Cf. A055932, A073493, A137921, A251729, A356224, A356843, A356845. %K A107428 nonn %O A107428 1,2 %A A107428 _N. J. A. Sloane_, May 26 2005 %E A107428 More terms from _Vladeta Jovovic_, May 26 2005