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.

A222048 Sum of largest parts of all partitions of n into an even number of parts.

Original entry on oeis.org

0, 0, 1, 2, 6, 9, 18, 26, 45, 62, 99, 135, 204, 274, 396, 527, 741, 973, 1333, 1736, 2331, 3007, 3970, 5079, 6615, 8393, 10796, 13605, 17320, 21673, 27339, 34001, 42540, 52597, 65324, 80332, 99127, 121274, 148745, 181131, 220956, 267852, 325114, 392476, 474178
Offset: 0

Views

Author

Alois P. Heinz, Feb 06 2013

Keywords

Comments

A222047(n) + a(n) = A006128(n).
A222047(n) - a(n) = A222049(n).

Examples

			a(6) = 18: partitions of 6 into an even number of parts are [1,1,1,1,1,1], [2,2,1,1], [3,1,1,1], [3,3], [4,2], [5,1], sum of largest parts is 1+2+3+3+4+5 = 18.
		

Crossrefs

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)[2]:
    seq(a(n), n=0..50);
  • Mathematica
    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][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 02 2017, translated from Maple *)