A253945 a(n) = 6*binomial(n+1,5).
6, 36, 126, 336, 756, 1512, 2772, 4752, 7722, 12012, 18018, 26208, 37128, 51408, 69768, 93024, 122094, 158004, 201894, 255024, 318780, 394680, 484380, 589680, 712530, 855036, 1019466, 1208256, 1424016, 1669536, 1947792, 2261952, 2615382, 3011652, 3454542
Offset: 4
Examples
For A={1,2,3,4,5}, subsets with 4 elements are {1,2,3,4}, {1,2,3,5}, {1,2,4,5}, {1,3,4,5,}, {2,3,4,5}. Sum of 3 smallest elements of each subset: a(5) = (1+2+3) + (1+2+3) + (1+2+4) + (1+3+4) + (2+3+4) = 36 = 6*binomial(5+1,5) = 6*A000389(5+1).
Links
- Colin Barker, Table of n, a(n) for n = 4..1000
- Serhat Bulut, Oktay Erkan Temizkan, Subset Sum Problem
- Sela Fried, Counting r X s rectangles in nondecreasing and Smirnov words, arXiv:2406.18923 [math.CO], 2024. See p. 9.
- Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
Programs
-
Magma
[6*Binomial(n+1, 5): n in [4..40]]; // Vincenzo Librandi, Feb 13 2015
-
Mathematica
Drop[Plus @@ Flatten[Part[#, 1 ;; 3] & /@ Subsets[Range@ #, {4}]] & /@ Range@ 28, 3] (* Michael De Vlieger, Jan 20 2015 *) 6 Binomial[Range[5, 29], 5] (* Michael De Vlieger, Feb 13 2015, after Alonso del Arte at A253946 *)
-
PARI
Vec(6*x^4/(1-x)^6 + O(x^100)) \\ Colin Barker, Apr 03 2015
Formula
a(n) = 6*A000389(n+1).
G.f.: 6*x^4 / (1-x)^6. - Colin Barker, Apr 03 2015
E.g.f.: x^4*(5 + x)*exp(x)/20. - G. C. Greubel, Nov 24 2017
Extensions
More terms from Vincenzo Librandi, Feb 13 2015
Comments