2ndSequence's blog

By 2ndSequence, history, 4 years ago, In English

Hello guys.. i read the tutorial and the comments and i can't get it sadly so far.. so if anyone can give me a hint for this problem Magic Formula gonna be grateful too much. The thing that i can't get in the tutorial is the flipping of (i % 1) ^ (i % 2) ^ ..... (i % n) to (1 % i) ^ (2 % i) ^ ..... (3 % i) ... (n % i).. and WHY would he do so.. Thanks in advance.

  • Vote: I like it
  • -1
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it
$$$Q = \oplus_{i=1}^{n} q_i = \oplus_{i=1}^{n} (p_i \oplus_{j=1}^{n} (i\ mod\ j)) =$$$
$$$(\oplus_{i=1}^{n} p_i)\ \oplus\ (\oplus_{i=1}^{n} \oplus_{j=1}^{n} (i\ mod\ j)) =$$$
$$$(\oplus_{j=1}^{n} p_j)\ \oplus\ (\oplus_{j=1}^{n} \oplus_{j=1}^{n} (i\ mod\ j)) =$$$
$$$\oplus_{j=1}^{n} (p_j \oplus_{i=1}^{n} (i\ mod\ j)) =$$$
$$$\oplus_{i=1}^{n} (p_i \oplus_{j=1}^{n} (j\ mod\ i)) = \oplus_{i=1}^{n} c_i$$$

because

$$$a\ \oplus\ b = b\ \oplus\ a$$$