This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A246750 #34 Nov 27 2020 06:58:48 %S A246750 9,28,41,65,85,96,149,176,200,244,281,332,389,400,497,565,609,657,745, %T A246750 833,884,989,1060,1132,1217,1312,1441,1536,1621,1740,1832,1961,2080, %U A246750 2189,2308,2424,2533,2669,2832,2948,3128,3244,3441,3557,3717,3901,4064,4204,4408 %N A246750 a(n) is the smallest number k that can be partitioned into a set of n distinct integers {e(1), e(2), ..., e(n)} where all e(i) >= 2 and the sum of e(i)*(e(i)-1) for i = 1 to n equals k*(k-1)/2. %C A246750 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. %H A246750 Andrew Howroyd, <a href="/A246750/a246750.txt">Faster PARI Program</a> %e A246750 For n = 3, {3, 6, 19} is the set with the smallest sum that has this property. With 3 socks of one color, 6 socks of another color, and 19 socks of a third color, there is exactly a 50% chance that a random draw of two socks will produce a matching pair. (3*2 + 6*5 + 19*18) = (28*27) / 2. %e A246750 n = 2, sum = 9, set = {3, 6} %e A246750 n = 3, sum = 28, set = {3, 6, 19} %e A246750 n = 4, sum = 41, set = {2, 3, 8, 28} %e A246750 n = 5, sum = 65, set = {2, 4, 6, 8, 45} %e A246750 n = 6, sum = 85, set = {2, 3, 5, 6, 10, 59} %o A246750 (PARI) \\ See Links for a faster program. %o A246750 a(n)={for(k=(n+1)*(n+2)/2-1, oo, my(t=k*(k-1)/2); forpart(p=k-n*(n+1)/2, if(sum(i=1, n, (p[i]+i)*(p[i]+i-1))==t, return(k)), , [n,n]))} \\ _Andrew Howroyd_, Nov 20 2020 %Y A246750 Cf. A332105. %K A246750 nonn %O A246750 2,1 %A A246750 _Dean D. Ballard_, Nov 20 2020 %E A246750 a(13)-a(50) from _Andrew Howroyd_, Nov 22 2020