login
A387704
Size of the maximal subset S of {1,2,...,n} such that for all a, b, c in S not necessarily distinct, a+b+c is unique up to permutation.
1
0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7
OFFSET
0,3
COMMENTS
It is straightforward to prove a(n) <= a(n+1) <= a(n)+1, and a(n) < a(3n+1).
LINKS
Thomas Bloom Problem 241, Erdős Problems.
EXAMPLE
For n=5, the maximal subset is {1,2,5}, which generates sums 3,4,5,6,7,8,9,11,12,15 uniquely. Adding 3 would create the duplicate sums 1+1+3=1+2+2, and adding 4 would create the duplicate sum 1+1+4=2+2+2. Hence, a(5)=3.
MATHEMATICA
FindMaxSubset[t_] := Module[{best={}, curr={}, used=ConstantArray[False, 3n+1], search},
search[x_] := Module[{newSums}, If[Length[curr]>Length[best], best=curr]; If[Length[curr] > Length[best], best=curr]; If[Length[curr]+(n-x+1)<=Length[best], Return[]]; Do[newSums=Flatten[{3k, k+2curr, k+Total /@ Subsets[curr, {2}], k+2curr}]; newSums = Flatten[{3k, Table[2k+c, {c, curr}], Table[k+curr[[i]]+curr[[j]], {i, Length@curr}, {j, i, Length@curr}]}]; If[FreeQ[used[[newSums]], True] && DuplicateFreeQ[newSums], used[[newSums]]=True; AppendTo[curr, k]; search[k + 1]; curr=Delete[curr, -1]; used[[newSums]] = False; ], {k, x, n}]]; search[1]; best]
CROSSREFS
Cf. A143824 (for 2-sums), A385931 (for distinct 3-sums).
Sequence in context: A385654 A186188 A227177 * A132944 A210568 A262887
KEYWORD
nonn,hard
AUTHOR
Sharvil Kesarwani, Dec 29 2025
STATUS
approved