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.
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
Dean D. Ballard, Nov 29 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
STATUS
approved