A280944 Maximum sum of a set of different positive integers less than or equal to n whose pairwise sums are all different.
3, 6, 9, 13, 17, 21, 26, 31, 36, 41, 46, 52, 58, 64, 70, 76, 82, 88, 94, 101, 108, 115, 122, 129, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 257, 266, 275, 284, 293, 302, 311, 320, 329, 339, 349, 359, 369, 379, 389, 399, 409, 419, 429, 439, 449, 459, 469, 479, 489, 499, 510, 521
Offset: 2
Keywords
Examples
For n = 10, the optimum set of integers is {10, 9, 8, 6, 3} and thus a(10) = 36. The 10 pair sums {19, 18, 17, 16, 15, 14, 13, 12, 11, 9} are all different.
Links
- Jörg Zurkirchen, Table of n, a(n) for n = 2..240
- PuzzleUp, Problem No 06, Different sums, August 31, 2016.
- Jörg Zurkirchen, Table of optimum solutions for n = 2..240
Crossrefs
Cf. A256966.
Programs
-
Mathematica
Array[Max[Total /@ Select[Rest@ Subsets@ Range@ #, Length@ Union[Total /@ #] == Length[#] &@ Select[Union[Sort /@ Tuples[#, 2]], UnsameQ @@ # &] &]] &, 15, 2] (* Michael De Vlieger, Jan 21 2018 *)
Comments