The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A232435 Number T(n,k) of compositions of n with exactly k (possibly overlapping) occurrences of the consecutive pattern 111; triangle T(n,k), n>=0, 0<=k<=max(0,n-2), read by rows. 2
 1, 1, 2, 3, 1, 7, 0, 1, 13, 2, 0, 1, 24, 5, 2, 0, 1, 46, 11, 4, 2, 0, 1, 89, 21, 11, 4, 2, 0, 1, 170, 45, 23, 11, 4, 2, 0, 1, 324, 99, 47, 23, 12, 4, 2, 0, 1, 618, 209, 102, 52, 23, 13, 4, 2, 0, 1, 1183, 427, 226, 112, 55, 24, 14, 4, 2, 0, 1, 2260, 883, 479 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Alois P. Heinz, Rows n = 0..150, flattened EXAMPLE T(4,0) = 7: [4], [3,1], [2,2], [1,3], [2,1,1], [1,2,1], [1,1,2]. T(7,1) = 11: [4,1,1,1], [2,2,2,1], [1,2,2,2], [1,1,1,4], [1,3,1,1,1], [2,2,1,1,1], [1,1,1,3,1], [2,1,1,1,2], [1,1,1,2,2], [1,1,1,2,1,1], [1,1,2,1,1,1]. T(7,2) = 4: [3,1,1,1,1], [1,1,1,1,3], [1,2,1,1,1,1], [1,1,1,1,2,1]. T(7,3) = 2: [2,1,1,1,1,1], [1,1,1,1,1,2]. T(7,5) = 1: [1,1,1,1,1,1,1]. Triangle T(n,k) begins: : 0 : 1; : 1 : 1; : 2 : 2; : 3 : 3, 1; : 4 : 7, 0, 1; : 5 : 13, 2, 0, 1; : 6 : 24, 5, 2, 0, 1; : 7 : 46, 11, 4, 2, 0, 1; : 8 : 89, 21, 11, 4, 2, 0, 1; : 9 : 170, 45, 23, 11, 4, 2, 0, 1; : 10 : 324, 99, 47, 23, 12, 4, 2, 0, 1; MAPLE b:= proc(n, t) option remember; `if`(n=0, 1, expand(add(`if`(abs(t)<>j, b(n-j, j), `if`(t<0, x, 1)*b(n-j, -j)), j=1..n))) end: T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)): seq(T(n), n=0..15); MATHEMATICA b[n_, t_] := b[n, t] = If[n==0, 1, Expand[Sum[If[Abs[t] != j, b[n-j, j], If[t<0, x, 1]*b[n-j, -j]], {j, 1, n}]]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Feb 08 2017, translated from Maple *) CROSSREFS Column k=0 gives: A128695. Row sums give: A011782. Sequence in context: A130405 A058372 A128264 * A114858 A193491 A352062 Adjacent sequences: A232432 A232433 A232434 * A232436 A232437 A232438 KEYWORD nonn,tabf AUTHOR Alois P. Heinz, Nov 23 2013 STATUS approved

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

Last modified February 4 14:15 EST 2023. Contains 360055 sequences. (Running on oeis4.)