Use any period 2^32 PRNG, which can easily be done with 4 bytes of storage. He used 8.<p>A simple LCG is of the form<p>seed <- A*seed + B<p>Start with any seed, in 32 bit unsigned int, assume 32 bit wrapping like in C/C++, etc. (or do mod yourself), pick good A and B, and away you go.<p>The Hull–Dobell Theorem tells you how to pick A and B for this size m=2^32: A and B are both odd and larger than 1 and A-1 is divisible by 4.<p>Finding nice A and B is a bit tricky - in which case look online for good choices or related theory.<p>Of course, a LCG may not be as random as you like. In that case one of the PCG variants solve the problem elegantly.