OFFSET
1,2
COMMENTS
Periodic with period 2^32.
This generator has widespread usage because it appeared in the popular "Numerical Recipes" series of books. The multiplier 1664525 is due to Knuth and the addend 1013904223 due to Lewis.
REFERENCES
Donald E. Knuth, The Art of Computer Programming: Vol 2, Seminumerical Algorithms (2nd ed.), 1981 (see Sections 3.2-3.3).
William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Numerical Recipes in C (2nd ed), Cambridge University Press, 1999 (see p. 284).
LINKS
FORMULA
a(n) = (1664525 * a(n) + 1013904223) mod 2^32.
MATHEMATICA
NestList[Mod[1664525*# + 1013904223, 2^32] &, 1, 50] (* Paolo Xausa, Jun 04 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 30 2025
STATUS
approved
