Let $S = s_1 + s_2 + ... + s_n$, with $s_i \in N$. Let $M =(p_1*s_1 + p_2*s_2 + ... + p_n*s_n) \bmod{p_{n+1}}$, where $p_i$ indicates $i$-th prime. Find $M$ in the function of $S$ only.
Source: http://mishabucko.wordpress.com
Let $S = s_1 + s_2 + ... + s_n$, with $s_i \in N$. Let $M =(p_1*s_1 + p_2*s_2 + ... + p_n*s_n) \bmod{p_{n+1}}$, where $p_i$ indicates $i$-th prime. Find $M$ in the function of $S$ only.
Source: http://mishabucko.wordpress.com
Impossible to do it. $S=1+2$ so $s_1=1$ and $s_2=2$, hence $M=2*1+3*2=8 \equiv 3(5)$. $S$ is, however, resistant to rearrangement: $S=2+1$, so $ s_1=2$ and $s_2=1$, i.e. $M=2*2+3*1=7 \equiv 2(5)$