This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A107428 Number of gap-free compositions of n. 4
 1, 2, 4, 6, 11, 21, 39, 71, 141, 276, 542, 1070, 2110, 4189, 8351, 16618, 33134, 66129, 131937, 263483, 526453, 1051984, 2102582, 4203177, 8403116, 16800894, 33593742, 67174863, 134328816, 268624026, 537192064, 1074288649, 2148414285, 4296543181, 8592585289 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS 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 LINKS Alois P. Heinz, Table of n, a(n) for n = 1..1000 Alois P. Heinz, Plot of (a(n)-2^(n-2))/2^(n-2) for n = 42..1000 P. Hitczenko and A. Knopfmacher, Gap-free compositions and gap-free samples of geometric random variables, Discrete Math., 294 (2005), 225-239. FORMULA a(n) ~ 2^(n-2). - Alois P. Heinz, Dec 07 2014 MAPLE b:= proc(n, i, t) option remember; `if`(n=0, t!,       `if`(i<1 or n add(b(n, i, 0), i=1..n): seq(a(n), n=1..40);  # Alois P. Heinz, Apr 14 2014 MATHEMATICA Table[Length[Select[Level[Map[Permutations, IntegerPartitions[n]], {2}], Length[Union[#]]==Max[#]-Min[#]+1&]], {n, 1, 20}] (* Geoffrey Critzer, Apr 13 2014 *) 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 *) CROSSREFS Cf. A107429, A034296, A251729. Sequence in context: A017993 A049870 A093970 * A086379 A096460 A322051 Adjacent sequences:  A107425 A107426 A107427 * A107429 A107430 A107431 KEYWORD nonn AUTHOR N. J. A. Sloane, May 26 2005 EXTENSIONS More terms from Vladeta Jovovic, May 26 2005 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 22 07:48 EDT 2019. Contains 328315 sequences. (Running on oeis4.)