A384158 Consecutive states of the linear congruential pseudo-random number generator for 16-bit WATFOR/WATFIV when started at 1.
1, 253, 31241, 6885, 5201, 5133, 20697, 26229, 16801, 23581, 2217, 3845, 22513, 26925, 29049, 9365, 10049, 19261, 23369, 14117, 32657, 4685, 5657, 22197, 12513, 20061, 29161, 4933, 2865, 3949, 16057, 31957, 24193, 25981, 19593, 9061, 31441, 24717, 27481, 5877
Offset: 1
References
- Terry M. Walker, Fundamentals of Fortran Programming: with WATFOR/WATFIV, Allyn and Bacon, 1975.
Links
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(253*a(n-1), 2^15)) end: seq(a(n), n=1..40); # Alois P. Heinz, May 21 2025
-
Mathematica
NestList[Mod[253*#, 2^15] &, 1, 100] (* Paolo Xausa, May 22 2025 *)
Formula
a(n) = 253 * a(n-1) mod 2^15.
a(n) == 1 (mod 4). - Hugo Pfoertner, May 26 2025
Comments