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.

A240219 Number of partitions p of n such that median(p) = mean(p).

Original entry on oeis.org

1, 2, 3, 4, 4, 8, 5, 9, 10, 14, 7, 24, 8, 22, 31, 28, 10, 56, 11, 71, 68, 47, 13, 143, 69, 66, 147, 216, 16, 367, 17, 241, 304, 122, 509, 1019, 20, 163, 603, 1238, 22, 1712, 23, 1789, 3144, 286, 25, 3956, 1581, 2481, 2101, 4638, 28, 7739, 7357, 9209, 3737
Offset: 1

Views

Author

Clark Kimberling, Apr 04 2014

Keywords

Examples

			a(6) counts these 8 partitions:  6, 51, 42, 33, 331, 222, 2211, 111111.
		

Crossrefs

Programs

  • Mathematica
    z = 60; f[n_] := f[n] = IntegerPartitions[n];
    Table[Count[f[n], p_ /; Median[p] < Mean[p]], {n, 1, z}]  (* A240217 *)
    Table[Count[f[n], p_ /; Median[p] <= Mean[p]], {n, 1, z}] (* A240218 *)
    Table[Count[f[n], p_ /; Median[p] == Mean[p]], {n, 1, z}] (* A240219 *)
    Table[Count[f[n], p_ /; Median[p] > Mean[p]], {n, 1, z}]  (* A240220 *)
    Table[Count[f[n], p_ /; Median[p] >= Mean[p]], {n, 1, z}] (* A240221 *)

Formula

a(n) = A240218(n) - A240217(n) for n >= 1.
a(n) + A240217(n) + A240220 = A000041(n) for n >= 1.