Crypto-Number

Walt and Gus have a great rivalry. Recently Gus has developed a cryptographic system. Walt is trying to crack it. While trying, he has found out that there is an array C of integers lying under the cryptographic system. Walt needs some information about the array C. Walt has developed an algorithm to generate random integers. He calls the random integers generated by this algorithm as “Crypto-Number”. The algorithm is as follows:


This is a companion discussion topic for the original entry at https://toph.co/p/crypto-number