A239141 Number of strict partitions of n having standard deviation <= 1.
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, 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, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2
Offset: 1
Examples
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.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10005
- Index entries for linear recurrences with constant coefficients, signature (0,0,1).
Programs
-
Mathematica
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]] Table[Count[g[n], p_ /; s[p] < 1], {n, z}] (* A239140 *) Table[Count[g[n], p_ /; s[p] <= 1], {n, z}] (* A239141 *) Table[Count[g[n], p_ /; s[p] == 1], {n, z}] (* periodic 01 *) Table[Count[g[n], p_ /; s[p] > 1], {n, z}] (* A239142 *) Table[Count[g[n], p_ /; s[p] >= 1], {n, z}] (* A239143 *) t[n_] := t[n] = N[Table[s[g[n][[k]]], {k, 1, PartitionsQ[n]}]] ListPlot[Sort[t[30]]] (*plot of st.dev's of strict partitions of 30*) (* Peter J. C. Moses, Mar 03 2014 *) Join[{1, 1, 2},LinearRecurrence[{0, 0, 1},{2, 2, 3},83]] (* Ray Chandler, Aug 25 2015 *)
-
PARI
A239141(n) = (1+(n>3)+!(n%3)); \\ Antti Karttunen, May 24 2021
Formula
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
Comments