|
|
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.
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
COMMENTS
|
These numbers solve the problem of what is the required minimum number of socks of n colors such that a random drawing of two socks has a 50% chance of matching. In this version the number of socks of each color is distinct, but there may be a color with only one sock.
|
|
LINKS
|
|
|
EXAMPLE
|
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}
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|