A222047 Sum of largest parts of all partitions of n into an odd number of parts.
0, 1, 2, 4, 6, 11, 17, 28, 41, 66, 93, 140, 195, 282, 384, 541, 722, 992, 1311, 1762, 2299, 3045, 3929, 5127, 6559, 8458, 10726, 13689, 17225, 21780, 27224, 34134, 42387, 52769, 65138, 80544, 98887, 121538, 148456, 181456, 220590, 268252, 324677, 392961
Offset: 0
Keywords
Examples
a(6) = 17: partitions of 6 into an odd number of parts are [2,1,1,1,1], [2,2,2], [3,2,1], [4,1,1], [6], sum of largest parts is 2+2+3+4+6 = 17.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
b:= proc(n, i) option remember; [`if`(n=i, n, 0), 0]+ `if`(i>n, [0, 0], b(n, i+1)+(l-> [l[2], l[1]])(b(n-i, i))) end: a:= n-> b(n,1)[1]: seq(a(n), n=0..50);
-
Mathematica
Table[Total[Max[#]&/@Select[IntegerPartitions[n],OddQ[Length[#]]&]],{n,0,50}] (* Harvey P. Dale, Apr 19 2014 *) b[n_, i_] := b[n, i] = {If[n==i, n, 0], 0} + If[i>n, {0, 0}, b[n, i+1] + Reverse[b[n-i, i]]]; a[n_] := b[n, 1][[1]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)
Comments