login
A385037
Consecutive states of the linear congruential pseudo-random number generator (936*s + 1399) mod 6655 when started at s=1.
4
1, 2335, 4119, 3538, 5432, 1331, 2730, 1159, 1458, 1812, 406, 2080, 5019, 753, 777, 3276, 6435, 1784, 818, 1722, 2681, 1880, 4159, 1048, 4042, 4671, 1120, 4884, 838, 477, 1986, 3550, 3354, 6238, 3732, 676, 1910, 5619, 3333, 6547, 136, 2250, 4419, 4828, 1662
OFFSET
1,2
COMMENTS
Periodic with period 6655.
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) = (936 * a(n-1) + 1399) mod 6655.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(936*a(n-1)+1399, 6655))
end:
seq(a(n), n=1..44); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[936*# + 1399, 6655] &, 1, 50] (* Paolo Xausa, Jun 16 2025 *)
CROSSREFS
KEYWORD
nonn,look,easy
AUTHOR
Sean A. Irvine, Jun 14 2025
STATUS
approved