# Reversing Key Algorithm

I have to craft up a number made of 19 digits so that, after some mathematical operations made 11 times, the resulting sum of the remainders of the first ten operations is equal to the the remainder of the eleventh operation. The eleven calculations are as follows. I need to reverse them in order to be able to craft up the x.

op_10 : (x / 256) mod 256 => This is the remainder that must be equal to the sum of the ten remainders below.

op_0 : (x / 72057594037927936) mod 256 => 1st remainder

op_1 : (x / 281474976710656) mod 256 => 2nd remainder

op_2 : (x / 65536) mod 16 => 3rd remainder

op_3 : (x / 1048576) mod 16 => 4th remainder

op_4 : (x / 16777216) mod 16 => 5th remainder

op_5 : (x / 268435456) mod 16 => 6th remainder

op_6 : (x / 4294967296) mod 16 => 7th remainder

op_7 : (x / 68719476736) mod 16 => 8th remainder

op_8 : (x / 1099511627776) mod 16 => 9th remainder

op_9 : (x / 17592186044416) mod 16 => 10th remainder

Is there such an algorithm? x is the number i need to craft up.

• An example solution is $x = 0$. – Yuval Filmus Mar 30 '14 at 13:17
• Are all the divisors powers of $2$? We know that $65536 = 2^{16}$, but I don't know about higher powers. If that is the case, maybe that is useful. – G. Bach Mar 30 '14 at 13:18
• @YuvalFilmus I guess that "0" doesn't count as 19 digits, though it clearly is a solution to the equation implied in the question. – David Richerby Mar 30 '14 at 16:59

You forgot to mention that $x$ is in fact $64$ bits long. Write $x$ in binary notation: $$x_{63} x_{62} \ldots x_1 x_0.$$ We have \begin{align*} op_0 &= x_{63} \cdots x_{56} \\ op_1 &= x_{55} \cdots x_{48} \\ op_2 &= x_{19} \cdots x_{16} \\ op_3 &= x_{23} \cdots x_{20} \\ op_4 &= x_{27} \cdots x_{24} \\ op_5 &= x_{31} \cdots x_{28} \\ op_6 &= x_{35} \cdots x_{32} \\ op_7 &= x_{39} \cdots x_{36} \\ op_8 &= x_{43} \cdots x_{40} \\ op_9 &= x_{47} \cdots x_{44} \\ op_{10} &= x_{15} \cdots x_8 \end{align*} All these, in binary notation.
• Well, $x = 0$ is a solution. All other solutions are settings of the bits $x_{63},\ldots,x_{16}$ such that $op_0 + \cdots + op_9 < 256$. (You also get the eight LSBs for free.) – Yuval Filmus Mar 30 '14 at 14:55
• If you want a 19-digit solution, you can take $2^{63} + 2^{15} = 9223372036854808576$. – Yuval Filmus Mar 30 '14 at 17:24