A385079 Consecutive states of the linear congruential pseudo-random number generator 228*s mod (2^16+1) when started at s=1.
1, 228, 51984, 55692, 49135, 61490, 60339, 60059, 61756, 55450, 59496, 64466, 17960, 31586, 58075, 2626, 8895, 61950, 34145, 51694, 55109, 47285, 32912, 32718, 54023, 61825, 5645, 41857, 40531, 351, 14491, 27098, 17866, 10154, 21317, 10538, 43332, 49146, 63998
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.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(228*a(n-1), 65537)) end: seq(a(n), n=1..44); # after Alois P. Heinz
-
Mathematica
NestList[Mod[228*#, 65537] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)
-
PARI
a(n) = lift(Mod(228, 65537)^(n-1)) \\ Jianing Song, Jun 17 2025
Formula
a(n) = 228 * a(n-1) mod (2^16+1).
Comments