Assume S is prime and derive a contradiction.
Add the 3 congruences abc+def = ab+bc+ac-de-ef-df = a+b+c+d+e+f = 0 mod S to get the factoring (a+1)(b+1)(c+1) + (d-1)(e-1)(f-1) = 0 mod S.
This process is repeatable, so we get (a+k)(b+k)(c+k) + (d-k)(e-k)(f-k) = 0 mod S for positive k.
At some point one of the factors of the second term becomes zero.
Let's say k=d, giving (a+d)(b+d)(c+d) = 0 mod S.
Since S is prime at least one of these factors is a multiple of S.
Say a+d = mS, m>=1.
But then the condition that a+b+c+d+e+f = S requires b+c+e+f = 0, when they're all supposed to be positive. There's the contradiction.
Posted by xdog
on 2013-02-17 15:35:12