A385080 Consecutive states of the linear congruential pseudo-random number generator 237*s mod (2^16+1) when started at s=1.
1, 237, 56169, 8042, 5381, 30094, 54282, 19582, 53344, 59424, 58570, 52783, 57541, 5521, 63274, 53502, 31333, 20240, 12679, 55758, 41709, 54483, 1682, 5412, 37441, 26022, 6736, 23544, 9283, 37350, 4455, 7243, 12629, 43908, 51350, 45605, 60317, 8063, 10358
Offset: 1
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..10000
- 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 65536.
Crossrefs
Cf. A385079.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(237*a(n-1), 65537)) end: seq(a(n), n=1..44); # after Alois P. Heinz
-
Mathematica
NestList[Mod[237*#, 65537] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)
-
PARI
a(n) = lift(Mod(237,65537)^(n-1)) \\ Jianing Song, Jun 17 2025
Formula
a(n) = 237 * a(n-1) mod (2^16+1).
Comments