A385037 Consecutive states of the linear congruential pseudo-random number generator (936*s + 1399) mod 6655 when started at s=1.
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
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..6655
- 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 6655.
Programs
-
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 *)
Formula
a(n) = (936 * a(n-1) + 1399) mod 6655.
Comments