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.
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
Keywords
Examples
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}
Crossrefs
Cf. A246750.
Programs
-
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
Extensions
a(16)-a(50) from Andrew Howroyd, Nov 22 2020
Comments