A385003 Consecutive states of the linear congruential pseudo-random number generator (421*s + 1663) mod 7875 when started at s=1.
1, 2084, 4902, 2155, 3293, 2016, 7774, 6392, 7320, 4258, 6656, 339, 2632, 7235, 7848, 6046, 3404, 1497, 1900, 6188, 186, 1219, 2987, 7065, 7153, 4826, 1659, 7102, 6980, 2868, 4216, 4724, 5967, 1645, 1208, 6231, 2539, 7457, 6810, 2173, 2996, 2979, 3697, 6725
Offset: 1
References
- 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. 285).
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..7875
- W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
- Index entries for sequences related to pseudo-random numbers.
- Index entries for linear recurrences with constant coefficients, order 7875.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(421*a(n-1)+1663, 7875)) end: seq(a(n), n=1..44); # Alois P. Heinz, Jun 14 2025
-
Mathematica
NestList[Mod[421*# + 1663, 7875] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)
Formula
a(n) = (421 * a(n-1) + 1663) mod 7875.
Comments