The "random" numbers produced by computers aren't purely random. They are actually pseudo-random, meaning that they are produced by mathematical formulas that simulate randomness.The linear congruential generator takes a seed X0 and generates subsequent pseudo-random numbers using the formula:
Xn+1=(aXn+c) mod m
X1 is the first pseudo-random number generated, X2 is the second, and so on. Let R be the 2000th pseudo-random number generated by the linear congruential generator when X0=42, a=25, c=31, and m=2^20. What are the last three digits of R?
2 answers
938
If the question asks for the last digits, you could code and evaluate the recursive formula to get the results.
If you would like a check, you are welcome. The sum of the 3 last digits is 20.
If you would like a check, you are welcome. The sum of the 3 last digits is 20.