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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A194621 Triangle T(n,k), n>=0, 0<=k<=n, read by rows: T(n,k) is the number of partitions of n in which any two parts differ by at most k. 17

%I #24 Sep 07 2018 14:53:28

%S 1,1,1,2,2,2,2,3,3,3,3,4,5,5,5,2,5,6,7,7,7,4,6,9,10,11,11,11,2,7,10,

%T 13,14,15,15,15,4,8,14,17,20,21,22,22,22,3,9,15,22,25,28,29,30,30,30,

%U 4,10,20,27,34,37,40,41,42,42,42,2,11,21,33,41,48,51,54,55,56,56,56

%N Triangle T(n,k), n>=0, 0<=k<=n, read by rows: T(n,k) is the number of partitions of n in which any two parts differ by at most k.

%C T(n,k) = A000041(n) for n >= 0 and k >= n.

%H Alois P. Heinz, <a href="/A194621/b194621.txt">Rows n = 0..140, flattened</a>

%F G.f. of column k: 1 + Sum_{j>0} x^j / Product_{i=0..k} (1-x^(i+j)).

%e T(6,0) = 4: [6], [3,3], [2,2,2], [1,1,1,1,1,1].

%e T(6,1) = 6: [6], [3,3], [2,1,1,1,1], [2,2,1,1], [2,2,2], [1,1,1,1,1,1].

%e T(6,2) = 9: [6], [4,2], [3,1,1,1], [3,2,1], [3,3], [2,1,1,1,1], [2,2,1,1], [2,2,2], [1,1,1,1,1,1].

%e Triangle begins:

%e 1;

%e 1, 1;

%e 2, 2, 2;

%e 2, 3, 3, 3;

%e 3, 4, 5, 5, 5;

%e 2, 5, 6, 7, 7, 7;

%e 4, 6, 9, 10, 11, 11, 11;

%e 2, 7, 10, 13, 14, 15, 15, 15;

%p b:= proc(n, i, k) option remember;

%p if n<0 or k<0 then 0

%p elif n=0 then 1

%p elif i<1 then 0

%p else b(n, i-1, k-1) +b(n-i, i, k)

%p fi

%p end:

%p T:= (n, k)-> `if`(n=0, 1, 0) +add(b(n-i, i, k), i=1..n):

%p seq(seq(T(n, k), k=0..n), n=0..20);

%t b[n_, i_, k_] := b[n, i, k] = If[n < 0 || k < 0, 0, If[n == 0, 1, If[i < 1, 0, b[n, i-1, k-1] + b[n-i, i, k]]]]; t[n_, k_] := If[n == 0, 1, 0] + Sum[b[n-i, i, k], {i, 1, n}]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, Dec 09 2013, translated from Maple *)

%Y Columns k=0-10 give (for n>0): A000005, A000027, A117142, A117143, A218506, A218507, A218508, A218509, A218510, A218511, A218512.

%Y Main diagonal gives: A000041.

%K nonn,tabl

%O 0,4

%A _Alois P. Heinz_, Aug 30 2011

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)