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.

Showing 1-5 of 5 results.

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.

A240217 Number of partitions p of n such that median(p) < mean(p).

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 8, 10, 16, 24, 38, 46, 74, 90, 123, 175, 234, 280, 391, 470, 632, 831, 1039, 1243, 1639, 2029, 2477, 3112, 3955, 4704, 6010, 7136, 8709, 10661, 12711, 15578, 19595, 23114, 27336, 32805, 39960, 46834, 56831, 66451, 79684, 96813, 113243
Offset: 1

Views

Author

Clark Kimberling, Apr 04 2014

Keywords

Examples

			a(6) counts these 3 partitions:  411, 3111, 21111.
		

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) = A240219(n) - A240218(n) for n >= 1.
a(n) + A240221(n) = A000041(n) for n >= 1.

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

Original entry on oeis.org

1, 2, 3, 5, 6, 11, 13, 19, 26, 38, 45, 70, 82, 112, 154, 203, 244, 336, 402, 541, 700, 878, 1052, 1386, 1708, 2095, 2624, 3328, 3971, 5071, 6027, 7377, 9013, 10783, 13220, 16597, 19615, 23277, 27939, 34043, 39982, 48546, 56854, 68240, 82828, 97099, 113268
Offset: 1

Views

Author

Clark Kimberling, Apr 04 2014

Keywords

Examples

			a(6) counts these 11 partitions:  6, 51, 42, 411, 33, 321, 3111, 222, 2211, 21111, 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) + A240220(n) = A000041(n) for n >= 1.
a(n) = A240217(n) + A240219(n) for n >= 1.

A240220 Number of partitions p of n such that median(p) > mean(p).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 3, 4, 4, 11, 7, 19, 23, 22, 28, 53, 49, 88, 86, 92, 124, 203, 189, 250, 341, 386, 390, 594, 533, 815, 972, 1130, 1527, 1663, 1380, 2022, 2738, 3246, 3295, 4601, 4628, 6407, 6935, 6306, 8459, 11486, 11493, 13904, 16214, 19615, 21423
Offset: 1

Views

Author

Clark Kimberling, Apr 04 2014

Keywords

Examples

			a(8) counts these 3 partitions:  431, 332, 22211.
		

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) = A240221(n) - A240219(n) for n >= 1.
a(n) + A240218(n) = A000041(n) for n >= 1.

A240302 Number of partitions of n such that (maximal multiplicity of parts) > (multiplicity of the maximal part).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 7, 10, 16, 23, 35, 47, 70, 93, 126, 169, 228, 294, 391, 501, 648, 827, 1057, 1329, 1683, 2105, 2631, 3266, 4056, 4992, 6156, 7538, 9221, 11234, 13664, 16549, 20033, 24152, 29077, 34904, 41844, 50012, 59710, 71100, 84541, 100318, 118869
Offset: 0

Views

Author

Clark Kimberling, Apr 04 2014

Keywords

Examples

			a(7) counts these 7 partitions: 511, 4111, 322, 3211, 31111, 22111, 211111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
          `if`(i<1, 0, b(n, i-1, k) +add(b(n-i*j, i-1, `if`(k=-1, j,
          `if`(k=0, 0, `if`(j>k, 0, k)))), j=1..n/i)))
        end:
    a:= n-> b(n$2, -1):
    seq(a(n), n=0..70);  # Alois P. Heinz, Apr 12 2014
  • Mathematica
    z = 60; f[n_] := f[n] = IntegerPartitions[n]; m[p_] := Max[Map[Length, Split[p]]] (* maximal multiplicity *)
    Table[Count[f[n], p_ /; m[p] == Count[p, Max[p]]], {n, 0, z}] (* A171979 *)
    Table[Count[f[n], p_ /; m[p] > Count[p, Max[p]]], {n, 0, z}] (* A240302 *)
    (* Second program: *)
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, If[k == 0, 1, 0],
         If[i < 1, 0, b[n, i - 1, k] + Sum[b[n - i*j, i - 1, If[k == -1, j,
         If[k == 0, 0, If[j > k, 0, k]]]], {j, 1, n/i}]]];
    a[n_] := b[n, n, -1];
    a /@ Range[0, 70] (* Jean-François Alcover, Jun 05 2021, after Alois P. Heinz *)

Formula

a(n) + A171979(n) = A000041(n) for n >= 1.
Showing 1-5 of 5 results.