The OEIS is supported by the many generous donors to the OEIS Foundation.

A332105
a(n) is the smallest number k that can be partitioned into a set of n distinct positive even integers {e(1), e(2), ..., e(n)} where the sum of e(i)*(e(i)-1) for i = 1 to n equals k*(k-1)/2.
3
16, 144, 80, 96, 160, 208, 256, 304, 384, 432, 544, 608, 720, 816, 832, 1040, 1168, 1264, 1360, 1568, 1664, 1808, 1984, 2080, 2256, 2480, 2704, 2800, 3104, 3248, 3520, 3744, 3968, 4112, 4464, 4688, 4880, 5200, 5472, 5744, 6016, 6336, 6608, 6800, 7248, 7568, 7888, 8080, 8528
OFFSET
2,1
These numbers solve the problem of what is the required minimum even number of socks of n colors such that a random drawing of two socks has a 50% chance of matching.
EXAMPLE
For n = 3, {6, 48, 90} is the set of even numbers with the smallest sum that has this property. With 6 socks of one color, 48 socks of another color, and 90 socks of a third color, there is exactly a 50% chance that a random draw of two socks will produce a matching pair. (6*5 + 48*47 + 90*89) = (144*143) / 2.
n = 2, sum = 16, set = {6, 10}
n = 3, sum = 144, set = {6, 48, 90}
n = 4, sum = 80, set = {2, 8, 16, 54}
n = 5, sum = 96, set = {2, 6, 8, 14, 66}
n = 6, sum = 160, set = {2, 6, 8, 10, 24, 110}
PROG
(PARI) \\ See Links in A246750 for a faster program.
a(n)={for(k=n*(n+1)/2, oo, my(t=k*(4*k-1)); forpart(p=2*k-n*(n-1)/2, if(sum(i=1, n, (p[i]+i-1)*(2*(p[i]+i-1)-1))==t, return(4*k)), , [n, n]))} \\ Andrew Howroyd, Nov 21 2020
CROSSREFS
Cf. A246750.
Sequence in context: A303145 A213349 A336239 * A032444 A358263 A358262
KEYWORD
nonn
AUTHOR
Dean D. Ballard, Nov 20 2020
EXTENSIONS
a(16)-a(50) from Andrew Howroyd, Nov 22 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 20 15:34 EDT 2024. Contains 376072 sequences. (Running on oeis4.)