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-4 of 4 results.

A238616 Number of partitions of n having standard deviation σ < 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 12, 15, 19, 23, 25, 33, 41, 44, 51, 58, 67, 78, 84, 99, 117, 124, 132, 155, 186, 202, 219, 244, 268, 290, 317, 344, 396, 427, 449, 501, 557, 597, 639, 714, 752, 824, 885, 948, 1031, 1084, 1185, 1308, 1390, 1452, 1589, 1692, 1788, 1919
Offset: 1

Views

Author

Clark Kimberling, Mar 01 2014

Keywords

Comments

Here, "standard deviation" means "population standard deviation" (denoted by σ), not "sample standard deviation" (denoted by s); σ is the square root of variance, so that σ of a list t = (t(k)), such as the partitions of a positive integer, is given by the formula sqrt((Sum_{k=1..#t} (t(k) - mean(t))^2)/(#t)), where #t is the number of terms in t(k). (The distinction between σ and s is discussed in most probability and statistics textbooks. The command "StandardDeviation" in Mathematica gives s, not σ.)

Examples

			There are 11 partitions of 6, whose standard deviations are given by these approximations: 0, 2, 1, 1.41421, 0, 0.816497, 0.866025, 0, 0.5, 0.4, 0, so that a(6) = 8.
		

Crossrefs

Column k=0 of A239223.

Programs

  • Maple
    b:= proc(n, i, m, s, c) `if`(n=0, `if`(s/c-(m/c)^2<1, 1, 0),
          `if`(i=1, b(0$2, m+n, s+n, c+n), add(b(n-i*j, i-1,
           m+i*j, s+i^2*j, c+j), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0$3):
    seq(a(n), n=1..55);  # Alois P. Heinz, Mar 12 2014
  • Mathematica
    z = 55; g[n_] := g[n] = IntegerPartitions[n]; s[t_] := s[t] = Sqrt[Sum[(t[[k]] - Mean[t])^2, {k, 1, Length[t]}]/Length[t]]
    Table[Count[g[n], p_ /; s[p] < 1], {n, z}]   (*A238616*)
    Table[Count[g[n], p_ /; s[p] <= 1], {n, z}]  (*A238617*)
    Table[Count[g[n], p_ /; s[p] == 1], {n, z}]  (*A238618*)
    Table[Count[g[n], p_ /; s[p] > 1], {n, z}]   (*A238619*)
    Table[Count[g[n], p_ /; s[p] >= 1], {n, z}]  (*A238620*)
    t[n_] := t[n] = N[Table[s[g[n][[k]]], {k, 1, PartitionsP[n]}]] ListPlot[Sort[t[30]]] (*plot of st.dev's of partitions of 30*)
    (* Second program: *)
    b[n_, i_, m_, s_, c_] := b[n, i, m, s, c] = If[n==0, If[s/c-(m/c)^2<1, 1, 0], If[i==1, b[0, 0, m+n, s+n, c+n], Sum[b[n-i*j, i-1, m+i*j, s+i^2*j, c+j], {j, 0, n/i}]]]; a[n_] := b[n, n, 0, 0, 0]; Table[a[n], {n, 1, 55}] (* Jean-François Alcover, Nov 20 2015, after Alois P. Heinz *)
    (* The interest of this 3rd program is just to show how Mathematica's StandardDeviation can be used, with a correction factor, to compute sigma, the population standard deviation. *)
    sigma[t_] := If[Length[t] == 1, 0, StandardDeviation[t]*Sqrt[(Length[t]-1)/ Length[t]]];
    a[n_] := Count[IntegerPartitions[n], p_ /; sigma[p] < 1];
    Array[a, 30] (* Jean-François Alcover, May 28 2021 *)

Formula

a(n) = A000041(n) - A238620(n).

A238619 Number of partitions of n having population standard deviation > 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 5, 8, 15, 22, 33, 47, 68, 93, 132, 176, 239, 314, 412, 536, 693, 884, 1131, 1427, 1803, 2249, 2808, 3489, 4321, 5325, 6552, 8022, 9799, 11913, 14456, 17502, 21136, 25457, 30588, 36673, 43869, 52398, 62437, 74277, 88186, 104526, 123670, 146028
Offset: 1

Views

Author

Clark Kimberling, Mar 01 2014

Keywords

Comments

Regarding "standard deviation" see Comments at A238616.

Examples

			There are 11 partitions of 6, whose standard deviations are given by these approximations:  0., 2., 1., 1.41421, 0., 0.816497, 0.866025, 0., 0.5, 0.4, 0, so that a(6) = 2.
		

Crossrefs

Cf. A238616.

Programs

  • Maple
    b:= proc(n, i, m, s, c) `if`(n=0, `if`(s/c-(m/c)^2>1, 1, 0),
          `if`(i=1, b(0$2, m+n, s+n, c+n), add(b(n-i*j, i-1,
           m+i*j, s+i^2*j, c+j), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0$3):
    seq(a(n), n=1..50);  # Alois P. Heinz, Mar 11 2014
  • Mathematica
    z = 55; g[n_] := g[n] = IntegerPartitions[n]; s[t_] := s[t] = Sqrt[Sum[(t[[k]] - Mean[t])^2, {k, 1, Length[t]}]/Length[t]]
    Table[Count[g[n], p_ /; s[p] < 1], {n, z}]   (*A238616*)
    Table[Count[g[n], p_ /; s[p] <= 1], {n, z}]  (*A238617*)
    Table[Count[g[n], p_ /; s[p] == 1], {n, z}]  (*A238618*)
    Table[Count[g[n], p_ /; s[p] > 1], {n, z}]   (*A238619*)
    Table[Count[g[n], p_ /; s[p] >= 1], {n, z}]  (*A238620*)
    t[n_] := t[n] = N[Table[s[g[n][[k]]], {k, 1, PartitionsP[n]}]]
    ListPlot[Sort[t[30]]] (*plot of st.dev's of partitions of 30*)
    (* Second program: *)
    b[n_, i_, m_, s_, c_] := b[n, i, m, s, c] = If[n == 0,
         If[s/c - (m/c)^2 > 1, 1, 0], If[i == 1, b[0, 0, m+n, s+n, c+n],
         Sum[b[n - i*j, i - 1, m + i*j, s + i^2*j, c+j], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0, 0, 0];
    Array[a, 50] (* Jean-François Alcover, Jun 03 2021, after Alois P. Heinz *)

Formula

a(n) + A238617(n) = A000041(n).

A238620 Number of partitions of n having population standard deviation >= 1.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 5, 10, 15, 23, 33, 52, 68, 94, 132, 180, 239, 318, 412, 543, 693, 885, 1131, 1443, 1803, 2250, 2808, 3499, 4321, 5336, 6552, 8032, 9799, 11914, 14456, 17528, 21136, 25458, 30588, 36699, 43869, 52422, 62437, 74290, 88186, 104527, 123670
Offset: 1

Views

Author

Clark Kimberling, Mar 01 2014

Keywords

Comments

Regarding "standard deviation" see Comments at A238616.

Examples

			There are 11 partitions of 6, whose standard deviations are given by these approximations:  0., 2., 1., 1.41421, 0., 0.816497, 0.866025, 0., 0.5, 0.4, 0, so that a(6) = 3.
		

Crossrefs

Cf. A238616.

Programs

  • Maple
    b:= proc(n, i, m, s, c) `if`(n=0, `if`(s/c-(m/c)^2>=1, 1, 0),
          `if`(i=1, b(0$2, m+n, s+n, c+n), add(b(n-i*j, i-1,
           m+i*j, s+i^2*j, c+j), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0$3):
    seq(a(n), n=1..50);  # Alois P. Heinz, Mar 11 2014
  • Mathematica
    z = 55; g[n_] := g[n] = IntegerPartitions[n]; s[t_] := s[t] = Sqrt[Sum[(t[[k]] - Mean[t])^2, {k, 1, Length[t]}]/Length[t]]
    Table[Count[g[n], p_ /; s[p] < 1], {n, z}]   (*A238616*)
    Table[Count[g[n], p_ /; s[p] <= 1], {n, z}]  (*A238617*)
    Table[Count[g[n], p_ /; s[p] == 1], {n, z}]  (*A238618*)
    Table[Count[g[n], p_ /; s[p] > 1], {n, z}]   (*A238619*)
    Table[Count[g[n], p_ /; s[p] >= 1], {n, z}]  (*A238620*)
    t[n_] := t[n] = N[Table[s[g[n][[k]]], {k, 1, PartitionsP[n]}]]
    ListPlot[Sort[t[30]]] (*plot of st.dev's of partitions of 30*)
    (* Second program: *)
    b[n_, i_, m_, s_, c_] := b[n, i, m, s, c] = If[n == 0,
         If[s/c - (m/c)^2 >= 1, 1, 0], If[i == 1, b[0, 0, m+n, s+n, c+n],
         Sum[b[n - i*j, i - 1, m + i*j, s + i^2*j, c + j], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0, 0, 0];
    Array[a, 50] (* Jean-François Alcover, Jun 03 2021, after Alois P. Heinz *)

Formula

a(n) = A000041(n) - A238616(n).

A238617 Number of partitions of n having standard deviation σ <= 1.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 10, 14, 15, 20, 23, 30, 33, 42, 44, 55, 58, 71, 78, 91, 99, 118, 124, 148, 155, 187, 202, 229, 244, 279, 290, 327, 344, 397, 427, 475, 501, 558, 597, 665, 714, 776, 824, 898, 948, 1032, 1084, 1245, 1308, 1395, 1452, 1606, 1692, 1807, 1919
Offset: 1

Views

Author

Clark Kimberling, Mar 01 2014

Keywords

Comments

Regarding "standard deviation" see Comments at A238616.

Examples

			There are 11 partitions of 6, whose standard deviations are given by these approximations:  0., 2., 1., 1.41421, 0., 0.816497, 0.866025, 0., 0.5, 0.4, 0, so that a(6) = 9.
		

Crossrefs

Cf. A238616.

Programs

  • Maple
    b:= proc(n, i, m, s, c) `if`(n=0, `if`(s/c-(m/c)^2<=1, 1, 0),
          `if`(i=1, b(0$2, m+n, s+n, c+n), add(b(n-i*j, i-1,
           m+i*j, s+i^2*j, c+j), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0$3):
    seq(a(n), n=1..50);  # Alois P. Heinz, Mar 11 2014
  • Mathematica
    z = 55; g[n_] := g[n] = IntegerPartitions[n]; s[t_] := s[t] = Sqrt[Sum[(t[[k]] - Mean[t])^2, {k, 1, Length[t]}]/Length[t]]
    Table[Count[g[n], p_ /; s[p] < 1], {n, z}]   (*A238616*)
    Table[Count[g[n], p_ /; s[p] <= 1], {n, z}]  (*A238617*)
    Table[Count[g[n], p_ /; s[p] == 1], {n, z}]  (*A238618*)
    Table[Count[g[n], p_ /; s[p] > 1], {n, z}]   (*A238619*)
    Table[Count[g[n], p_ /; s[p] >= 1], {n, z}]  (*A238620*)
    t[n_] := t[n] = N[Table[s[g[n][[k]]], {k, 1, PartitionsP[n]}]]
    ListPlot[Sort[t[30]]] (*plot of st.dev's of partitions of 30*)
    b[n_, i_, m_, s_, c_] := b[n, i, m, s, c] = If[n == 0, If[s/c - (m/c)^2 <= 1, 1, 0], If[i == 1, b[0, 0, m + n, s + n, c + n], Sum[b[n - i*j, i - 1, m + i*j, s + i^2*j, c + j], {j, 0, n/i}]]]; a[n_] := b[n, n, 0, 0, 0]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Nov 16 2015, after Alois P. Heinz *)

Formula

a(n) + A238619(n) = A000041(n).
Showing 1-4 of 4 results.