A384961 Consecutive states of the linear congruential pseudo-random number generator (257*s + 41) mod 2^16 when started at s=1.
1, 298, 11091, 32380, 64165, 40910, 28151, 25888, 34121, 52850, 16539, 56260, 40941, 36118, 41791, 57960, 19089, 56250, 38371, 30988, 34101, 47710, 6279, 40880, 20441, 10498, 11051, 22100, 43645, 10150, 52687, 40184, 38177, 46666, 115, 29596, 4037, 54510
Offset: 1
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..10000
- B. D. Ripley, Computer Generation of Random Variables: A Tutorial, International Statistical Review, 51 (1983), 301-309.
- W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
- Alan Tootill, PCW Subset, Personal Computer World, Feb 1982 (see p. 157).
- 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(257*a(n-1)+41, 2^16)) end: seq(a(n), n=1..38); # Alois P. Heinz, Jun 13 2025
-
Mathematica
NestList[Mod[257*# + 41, 2^16] &, 1, 50] (* Paolo Xausa, Jun 18 2025 *)
Formula
a(n) = (257 * a(n-1) + 41) mod 2^16.
Comments