Source: Day 22: Monkey Market
Full solution for today (spoilers!).
Part 1
Implement a PRNG with the following update function:
- Multiply by 64, xor with the previous value, modulo 16777216
- Divide by 32, xor with the previous value (from step 1), modulo 16777216
- Multiply by 2048, xor with the previous value (from step 2), module 16777216
For each of a series of seeds, sum the 2000th generated number.