login
A385003
Consecutive states of the linear congruential pseudo-random number generator (421*s + 1663) mod 7875 when started at s=1.
6
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,2
COMMENTS
Periodic with period 7875.
Described in Numerical Recipes as a "quick and dirty" generator.
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).
FORMULA
a(n) = (421 * a(n-1) + 1663) mod 7875.
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 *)
CROSSREFS
KEYWORD
nonn,easy,look
AUTHOR
Sean A. Irvine, Jun 14 2025
STATUS
approved