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.

A172467 T(n,k) = number of summands in the partitions of n into k parts; a triangular array.

This page as a plain text file.
%I A172467 #24 Dec 27 2015 10:38:20
%S A172467 1,1,2,1,2,3,1,4,3,4,1,4,6,4,5,1,6,9,8,5,6,1,6,12,12,10,6,7,1,8,15,20,
%T A172467 15,12,7,8,1,8,21,24,25,18,14,8,9,1,10,24,36,35,30,21,16,9,10,1,10,30,
%U A172467 44,50,42,35,24,18,10,11,1,12,36,60,65,66,49,40,27,20,11,12,1
%N A172467 T(n,k) = number of summands in the partitions of n into k parts; a triangular array.
%C A172467 The triangles A172467 and A066633 have identical row sums, given by A006128.
%H A172467 Alois P. Heinz, <a href="/A172467/b172467.txt">Rows n = 1..141, flattened</a>
%e A172467 First six rows:
%e A172467 1
%e A172467 1 2
%e A172467 1 2 3
%e A172467 1 4 3 4
%e A172467 1 4 6 4 5
%e A172467 1 6 9 8 5 6
%e A172467 partition of 5 into 1 part: 5
%e A172467 partitions of 5 into 2 parts: 4+1, 3+2
%e A172467 partitions of 5 into 3 parts: 3+1+1, 2+2+1
%e A172467 partition of 5 into 4 parts: 2+1+1+1
%e A172467 partition of 5 into 5 parts: 1+1+1+1+1;
%e A172467 consequently row 5 of the triangle is 1,4,6,4,5
%p A172467 b:= proc(n, i, k) option remember; `if`(n=0, [`if`(k=0, 1, 0), 0],
%p A172467       `if`(i<1 or k=0, [0$2], ((f, g)-> f+g+[0, g[1]])(b(n, i-1, k),
%p A172467       `if`(i>n, [0$2], b(n-i, i, k-1)))))
%p A172467     end:
%p A172467 T:= (n, k)-> b(n$2, k)[2]:
%p A172467 seq(seq(T(n, k), k=1..n), n=1..14);  # _Alois P. Heinz_, Aug 04 2014
%t A172467 p[n_] := IntegerPartitions[n];
%t A172467 l[n_, j_] := Length[p[n][[j]]]
%t A172467 t = Table[l[n, j], {n, 1, 13}, {j, 1, Length[p[n]]}]
%t A172467 f[n_, k_] := k*Count[t[[n]], k]
%t A172467 t = Table[f[n, k], {n, 1, 13}, {k, 1, n}]
%t A172467 TableForm[t] (* A172467 as a triangle *)
%t A172467 Flatten[t]   (* A172467 as a sequence *)
%t A172467 (* second program: *)
%t A172467 b[n_, i_, k_] := b[n, i, k] = If[n==0, {If[k==0, 1, 0], 0}, If[i<1 || k==0, {0, 0}, Function[{f, g}, f + g + {0, g[[1]]}][b[n, i-1, k], If[i>n, {0, 0}, b[n-i, i, k-1]]]]]; T[n_, k_] := b[n, n, k][[2]]; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Dec 27 2015, after _Alois P. Heinz_ *)
%Y A172467 Cf. A006128, A066633.
%K A172467 nonn,tabl
%O A172467 1,3
%A A172467 _Clark Kimberling_, Mar 03 2012