Multiplication on the dihedral group.

http://i50.tinypic.com/ae9z4z.jpg

I'm very confused, because I've checked it a few times and I come up with the same answer. If s is even, j is positive. If s is odd, j is negative. Since for every j, something must be wrong, right?

**Edit**: After working on this problem for a while, I found that I am actually right, and whether or not s is even affects the multiplication. Now I'm stuck on another problem:

Show that this is a group. I can't prove is associativity. Do I have to go through the case for the parity of each x? That's at least 16 separate cases!