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
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.
-
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
-
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 *)
A238656
Number of partitions of n having standard deviation σ > 4.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 5, 9, 14, 19, 28, 41, 57, 80, 109, 149, 199, 265, 351, 457, 599, 780, 1011, 1299, 1664, 2121, 2682, 3377, 4252, 5345, 6660, 8279, 10277, 12733, 15596, 19245, 23556, 28761, 35066, 42723, 51615, 62657, 75494, 90978
Offset: 1
There are 30 partitions of 9, whose standard deviations are given by these approximations: 0., 3.5, 2.5, 2.82843, 1.5, 2.16025, 2.16506, 0.5, 1.63299, 1.41421, 1.63936, 1.6, 1.41421, 0.816497, 1.29904, 1.08972, 1.16619, 1.11803, 0., 0.829156, 0.979796, 0.433013, 0.748331, 0.763763, 0.699854, 0.4, 0.5, 0.451754, 0.330719, 0, so that a(9) = 0.
-
z = 53; g[n_] := g[n] = IntegerPartitions[n]; c[t_] := c[t] = Length[t];
s[t_] := s[t] = Sqrt[Sum[(t[[k]] - Mean[t])^2, {k, 1, c[t]}]/c[t]]
Table[Count[g[n], p_ /; s[p] > 3], {n, z}] (*A238655*)
Table[Count[g[n], p_ /; s[p] > 4], {n, z}] (*A238656*)
Table[Count[g[n], p_ /; s[p] > 5], {n, z}] (*A238657*)
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*)
A238657
Number of partitions of n having standard deviation σ > 5.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 5, 9, 11, 16, 25, 34, 45, 64, 87, 121, 160, 212, 279, 369, 481, 614, 797, 1027, 1308, 1670, 2102, 2661, 3345, 4189, 5224, 6494, 8069, 9982, 12281, 15093, 18508, 22731, 27564, 33639, 40757, 49496, 59838, 72228
Offset: 1
There are 30 partitions of 9, whose standard deviations are given by these approximations: 0., 3.5, 2.5, 2.82843, 1.5, 2.16025, 2.16506, 0.5, 1.63299, 1.41421, 1.63936, 1.6, 1.41421, 0.816497, 1.29904, 1.08972, 1.16619, 1.11803, 0., 0.829156, 0.979796, 0.433013, 0.748331, 0.763763, 0.699854, 0.4, 0.5, 0.451754, 0.330719, 0, so that a(9) = 0.
-
z = 53; g[n_] := g[n] = IntegerPartitions[n]; c[t_] := c[t] = Length[t];
s[t_] := s[t] = Sqrt[Sum[(t[[k]] - Mean[t])^2, {k, 1, c[t]}]/c[t]]
Table[Count[g[n], p_ /; s[p] > 3], {n, z}] (*A238655*)
Table[Count[g[n], p_ /; s[p] > 4], {n, z}] (*A238656*)
Table[Count[g[n], p_ /; s[p] > 5], {n, z}] (*A238657*)
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*)
Showing 1-3 of 3 results.
Comments