login
A384451
Consecutive states of the linear congruential pseudo-random number generator randq1 from Numerical Recipes when started at 1.
1
1, 1015568748, 1586005467, 2165703038, 3027450565, 217083232, 1587069247, 3327581586, 2388811721, 70837908, 2745540835, 1075679462, 1814098701, 2536995080, 3594602695, 1009643386, 4212701329, 3697481916, 1403919595, 2931756366, 2282599509, 927463856, 448971087
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).
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
Cf. A384448 (same multiplier).
Cf. A096550-A096561 other pseudo-random number generators.
Sequence in context: A269120 A095733 A239919 * A020666 A074205 A277054
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 30 2025
STATUS
approved