OFFSET
1,1
COMMENTS
Comment from Raymond Wang, Oct 03 2008: (65421664*40014) mod (2^31-85) = 2^31-86.
REFERENCES
P. L'Ecuyer, Efficient and portable combined random number generators, Communications of the ACM, v.31 n.6, p. 742-751 and 774, 1988.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
P. L'Ecuyer, Random Number Generation, Chapter 4 of the Handbook on Simulation, Jerry Banks Ed., Wiley, 1998.
Intel FORTRAN Language Reference, Document No. 253261-002, Chapter 9, Intrinsic Procedure RANDOM_NUMBER.
FORMULA
a(1)=2^31-86, a(n)=40014*a(n-1) mod (2^31-85).
MAPLE
a:= proc(n) option remember; `if`(n=1, 2147483562,
irem(40014 *a(n-1), 2147483563))
end:
seq(a(n), n=1..30); # Alois P. Heinz, Jun 10 2014
MATHEMATICA
NestList[Mod[#*40014, 2^31 - 85] &, 2^31 - 86, 50] (* Paolo Xausa, Aug 29 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 13 2004
STATUS
approved