OFFSET
1,3
COMMENTS
A lower bound for a(n^2) is n (use the n^2 partition of the first n consecutive odd numbers.)
An upper bound u for a(n) is found by a partition of A057944(n); [1,..,u]. This gives u = floor((floor(sqrt(8*n+7))-1)/2). - David A. Corneth, Jun 06 2016
EXAMPLE
a(24) = 5 because {1,2,4,7,10} is a partition of 24 and there are no sum-free partitions with more parts.
Candidates for such a partition of size 5 of 24 are found by adding [0,1,2,3,4] to partitions of 5 of 24 - (0+1+2+3+4). - David A. Corneth, Jun 06 2016
a(25) = 5 because {1,3,5,7,9} is a partition of 25. {1,2,4,7,11} does not show that a(25) >= 5 because 4,7, and 11 are all elements of the set and 4+7=11.
MATHEMATICA
dif[w_] := Length[w] <= 2 || {} == Intersection[w, Reap[ Do[ Sow[w[[i]] + w[[j]]], {i, Length@ w}, {j, i-1}]][[2, 1]]]; p[tg_, w_] := If[tg == 0, bst = Max[bst, Length@ w], Block[{v=If[w == {}, 0, Last@w], u}, Do[u = Append[w, k]; If[dif@ u, p[tg-k, u]], {k, v+1, tg}]]]; a[n_] := (bst = 0; p[n, {}]; bst); Array[a, 50] (* Giovanni Resta, Jun 06 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gordon Hamilton, Jun 06 2016
EXTENSIONS
a(25)-a(86) from Giovanni Resta, Jun 06 2016
STATUS
approved