%I #20 Nov 19 2022 19:19:55
%S 1,1,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,
%T 2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,
%U 3,2,2,3,2,2,3,2,2,3,2,2,3,2,2,3,2,2
%N Number of strict partitions of n having standard deviation <= 1.
%C Regarding standard deviation, see Comments at A238616.
%H Antti Karttunen, <a href="/A239141/b239141.txt">Table of n, a(n) for n = 1..10005</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1).
%F a(n) + A239142(n) = A000009(n) for n >= 1.
%F G.f.: -(x^5 + x^4 + x^3 + 2*x^2 + x + 1)*x / ((x-1)*(x^2 + x + 1)). - _Alois P. Heinz_, Mar 14 2014
%e The standard deviations of the strict partitions of 9 are 0.0, 3.5, 2.5, 1.5, 2.16025, 0.5, 1.63299, 0.816497, so that a(9) = 3.
%t z = 30; g[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &]; s[t_] := s[t] = Sqrt[Sum[(t[[k]] - Mean[t])^2, {k, 1, Length[t]}]/Length[t]]
%t Table[Count[g[n], p_ /; s[p] < 1], {n, z}] (* A239140 *)
%t Table[Count[g[n], p_ /; s[p] <= 1], {n, z}] (* A239141 *)
%t Table[Count[g[n], p_ /; s[p] == 1], {n, z}] (* periodic 01 *)
%t Table[Count[g[n], p_ /; s[p] > 1], {n, z}] (* A239142 *)
%t Table[Count[g[n], p_ /; s[p] >= 1], {n, z}] (* A239143 *)
%t t[n_] := t[n] = N[Table[s[g[n][[k]]], {k, 1, PartitionsQ[n]}]]
%t ListPlot[Sort[t[30]]] (*plot of st.dev's of strict partitions of 30*)
%t (* _Peter J. C. Moses_, Mar 03 2014 *)
%t Join[{1, 1, 2},LinearRecurrence[{0, 0, 1},{2, 2, 3},83]] (* _Ray Chandler_, Aug 25 2015 *)
%o (PARI) A239141(n) = (1+(n>3)+!(n%3)); \\ _Antti Karttunen_, May 24 2021
%Y Cf. A000009, A238616, A239140, A239142, A239143.
%K nonn,easy
%O 1,3
%A _Clark Kimberling_, Mar 11 2014
|