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!)
A245840 Triangle T read by rows: T(n,k) = Total number of odd parts in all partitions of n with exactly k parts, 1 <= k <= n. 4

%I #16 Nov 17 2015 04:11:10

%S 1,0,2,1,1,3,0,2,2,4,1,2,4,3,5,0,4,4,6,4,6,1,3,8,7,8,5,7,0,4,8,12,10,

%T 10,6,8,1,4,13,14,17,13,12,7,9,0,6,12,22,20,22,16,14,8,10,1,5,18,25,

%U 32,27,27,19,16,9,11

%N Triangle T read by rows: T(n,k) = Total number of odd parts in all partitions of n with exactly k parts, 1 <= k <= n.

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

%F T(n,k) + A245842(n,k) = A172467(n,k).

%e Triangle begins

%e 1

%e 0 2

%e 1 1 3

%e 0 2 2 4

%e 1 2 4 3 5

%e 0 4 4 6 4 6

%e 1 3 8 7 8 5 7

%e 0 4 8 12 10 10 6 8

%e 1 4 13 14 17 13 12 7 9

%e 0 6 12 22 20 22 16 14 8 10

%e 1 5 18 25 32 27 27 19 16 9 11

%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, `if`(irem(i, 2)=1,

%p g[1], 0)])(b(n, i-1, k), `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 Grid[Table[Sum[Count[Flatten[IntegerPartitions[n, {k}]], i], {i, 1, n, 2}], {n, 1, 11}, {k, 1, n}]]

%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, If[Mod[i, 2]==1, g[[1]], 0]}][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[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* _Jean-François Alcover_, Nov 17 2015, after _Alois P. Heinz_ *)

%Y Cf. A066897 (row sums), A245841 (partial sums of row entries).

%Y Cf. A245842, A245843.

%K nonn,tabl

%O 1,3

%A _L. Edson Jeffery_, Aug 03 2014

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 September 16 03:28 EDT 2024. Contains 375959 sequences. (Running on oeis4.)