login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of partitions of n having population standard deviation < 2.
8

%I #27 Jun 01 2021 19:17:26

%S 1,2,3,5,7,10,14,19,25,33,44,57,72,92,114,143,179,216,267,321,389,470,

%T 562,668,798,946,1100,1295,1521,1759,2059,2392,2742,3206,3674,4172,

%U 4831,5566,6265,7115,8089,9152,10381,11664,13131,14927,16666,18565,20977

%N Number of partitions of n having population standard deviation < 2.

%F a(n) + A238662(n) = A000041(n).

%e There are 22 partitions of 8, whose population standard deviations are given by these approximations: 0., 3., 2., 2.35702, 1., 1.69967, 1.73205, 0., 1.24722, 0.942809, 1.22474, 1.2, 0.471405, 1., 0.707107, 0.8, 0.745356, 0., 0.489898, 0.471405, 0.349927, 0, so that a(8) = 19.

%t z = 50; 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]];

%t Table[Count[g[n], p_ /; s[p] < 2], {n, z}] (* A238658 *)

%t Table[Count[g[n], p_ /; s[p] <= 2], {n, z}] (* A238659 *)

%t Table[Count[g[n], p_ /; s[p] == 2], {n, z}] (* A238660 *)

%t Table[Count[g[n], p_ /; s[p] > 2], {n, z}] (* A238661 *)

%t Table[Count[g[n], p_ /; s[p] >= 2], {n, z}] (* A238662 *)

%t t[n_] := t[n] = N[Table[s[g[n][[k]]], {k, 1, PartitionsP[n]}]]

%t ListPlot[Sort[t[30]]] (* plot of st deviations of partitions of 30 *)

%t (* Second program: *)

%t b[n_, i_, m_, s_, c_] := b[n, i, m, s, c] = If[n == 0, If[s/c - (m/c)^2 >= 4, 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}]]];

%t a[n_] := PartitionsP[n] - b[n, n, 0, 0, 0];

%t Array[a, 50] (* _Jean-François Alcover_, May 27 2021, after _Alois P. Heinz_ *)

%Y Cf. A000041, A238616, A238659, A238660, A238661, A238662.

%K nonn,easy

%O 1,2

%A _Clark Kimberling_, Mar 03 2014