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.

A211373 Sum of median parts of all partitions of n into an odd number of parts.

Original entry on oeis.org

0, 1, 2, 4, 5, 9, 12, 18, 24, 37, 47, 68, 89, 123, 160, 218, 276, 370, 472, 615, 778, 1006, 1259, 1607, 2005, 2530, 3136, 3926, 4833, 6004, 7363, 9070, 11067, 13562, 16461, 20053, 24241, 29370, 35362, 42648, 51135, 61400, 73367, 87718, 104448, 124428, 147655
Offset: 0

Views

Author

Alois P. Heinz, Feb 06 2013

Keywords

Examples

			a(6) = 12: 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 median parts is 1+2+2+1+6 = 12.
		

Crossrefs

Programs

  • Maple
    with(combinat):
    a:= n-> add(`if`(nops(l)::odd, l[(nops(l)+1)/2], 0), l=partition(n)):
    seq(a(n), n=0..40);
  • Mathematica
    a[n_] := Sum[If[OddQ @ Length[l], l[[(Length[l]+1)/2]], 0], {l, IntegerPartitions[n]}];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Aug 20 2021, after Alois P. Heinz *)