The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A172467 T(n,k) = number of summands in the partitions of n into k parts; a triangular array. 3

%I #24 Dec 27 2015 10:38:20

%S 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 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 44,50,42,35,24,18,10,11,1,12,36,60,65,66,49,40,27,20,11,12,1

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

%C The triangles A172467 and A066633 have identical row sums, given by A006128.

%H Alois P. Heinz, <a href="/A172467/b172467.txt">Rows n = 1..141, flattened</a>

%e First six rows:

%e 1

%e 1 2

%e 1 2 3

%e 1 4 3 4

%e 1 4 6 4 5

%e 1 6 9 8 5 6

%e partition of 5 into 1 part: 5

%e partitions of 5 into 2 parts: 4+1, 3+2

%e partitions of 5 into 3 parts: 3+1+1, 2+2+1

%e partition of 5 into 4 parts: 2+1+1+1

%e partition of 5 into 5 parts: 1+1+1+1+1;

%e consequently row 5 of the triangle is 1,4,6,4,5

%p b:= proc(n, i, k) option remember; `if`(n=0, [`if`(k=0, 1, 0), 0],

%p `if`(i<1 or k=0, [0$2], ((f, g)-> f+g+[0, g[1]])(b(n, i-1, k),

%p `if`(i>n, [0$2], b(n-i, i, k-1)))))

%p end:

%p T:= (n, k)-> b(n$2, k)[2]:

%p seq(seq(T(n, k), k=1..n), n=1..14); # _Alois P. Heinz_, Aug 04 2014

%t p[n_] := IntegerPartitions[n];

%t l[n_, j_] := Length[p[n][[j]]]

%t t = Table[l[n, j], {n, 1, 13}, {j, 1, Length[p[n]]}]

%t f[n_, k_] := k*Count[t[[n]], k]

%t t = Table[f[n, k], {n, 1, 13}, {k, 1, n}]

%t TableForm[t] (* A172467 as a triangle *)

%t Flatten[t] (* A172467 as a sequence *)

%t (* second program: *)

%t 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 Cf. A006128, A066633.

%K nonn,tabl

%O 1,3

%A _Clark Kimberling_, Mar 03 2012

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 June 7 01:45 EDT 2024. Contains 373140 sequences. (Running on oeis4.)