%I #10 Jun 15 2026 18:39:17
%S 1,2,3,4,5,6,7,8,9,10,11,12,13,13,14,14,16,16,18,18,20,20,22,22,24,24,
%T 26,26,27,26,28,30,29,30,33,32,33,36,36
%N a(n) is the maximum size of a subset of the cyclic group Z/nZ that can be partitioned into three sum-free sets.
%C A subset S of an abelian group is sum-free if there are no x, y, z in S (not necessarily distinct) with x + y = z. Equivalently, a(n) is the largest m such that some m-element subset of Z/nZ can be 3-colored so that no color class contains a solution of x + y = z (mod n).
%C a(n) = n - 1 for 2 <= n <= 14: all n - 1 nonzero elements of Z/nZ can be partitioned into three sum-free sets. The first deviation is a(15) = 13 = n - 2.
%C If d divides n, the preimage of a sum-free subset of Z/dZ under the reduction map Z/nZ -> Z/dZ is sum-free, so a partition attaining a(d) lifts to a partition of (n/d)*a(d) elements of Z/nZ; hence a(n) >= (n/d)*a(d). Since a(d) = d - 1 for d <= 14, this gives a(n) >= n - n/d for every divisor d <= 14 of n. For every n <= 40 with a divisor in [7, 14] this bound is attained: a(n) = n - n/D, where D is the largest divisor of n with D <= 14. The composite n <= 40 with no divisor in that range (15, 25, 34, 38) exceed all such lift bounds.
%C a(n) is not monotonic; for example a(31) = 26 < a(30) = 27.
%C The analogous quantity for a general finite abelian group is not determined by the order alone, and for three sum-free sets this fails already at order 9: Z/3Z X Z/3Z gives 7, whereas a(9) = 8 for the cyclic group Z/9Z, so the cyclic restriction is essential. (For two sum-free sets the value is the same for every abelian group of order n for all n <= 48, first differing at order 49; see A396815.)
%F a(n) <= n - 1.
%F a(n) >= A396815(n).
%F a(n) >= (n/d)*a(d) for every divisor d of n; in particular a(n) >= n - n/d for every divisor d <= 14 of n (see Comments).
%Y Cf. A211316 (k=1 case), A396815 (k=2 case).
%K nonn,more
%O 2,2
%A _Alex Towell_, Jun 07 2026