A339271 a(n) is the smallest number k that can be partitioned into a set of n distinct positive integers {e(1), e(2), ..., e(n)} where Sum_{i=1..n} e(i)*(e(i)-1) = k*(k-1)/2.
4, 13, 20, 53, 56, 92, 109, 120, 160, 200, 221, 268, 325, 389, 420, 497, 561, 616, 684, 725, 813, 901, 969, 1064, 1132, 1197, 1329, 1421, 1516, 1581, 1740, 1849, 1904, 2060, 2189, 2288, 2444, 2560, 2696, 2849, 2985, 3128, 3261, 3404, 3564, 3744, 3904, 4044, 4204, 4381, 4585, 4725
Offset: 2
Keywords
Examples
For n = 3, {1, 3, 9} is the set with the smallest sum that has this property. With 1 socks of one color, 3 socks of another color, and 9 socks of a third color, there is exactly a 50% chance that a random draw of two socks will produce a matching pair. (1*0 + 3*2 + 9*8) = (13*12) / 2. n = 2, sum = 4, set = {1, 3} n = 3, sum = 13, set = {1, 3, 9} n = 4, sum = 20, set = {1, 2, 3, 14} n = 5, sum = 53, set = {1, 2, 3, 11, 36} n = 6, sum = 56, set = {1, 2, 3, 5, 6, 39}
Programs
-
PARI
\\ See 'Faster PARI Program' link in A246750 for PartsByWeight. a(n)={local(FC=Map()); for(k=1, oo, if(PartsByWeight(n, k-n*(n-1)/2, k*(k-1)/2, (i,v)->(i+v-1)*(i+v-2)), return(k))); oo} \\ Andrew Howroyd, Nov 30 2020
Extensions
a(16)-a(24) from Michael S. Branicky, Nov 29 2020
a(25)-a(30) from Andrew Howroyd, Nov 30 2020
a(31)-a(53) from Michael S. Branicky, Dec 03 2020
Comments