A384404 Consecutive states of the linear congruential pseudo-random number generator for Turbo Pascal when started at 1.
1, 134775814, 3698175007, 870078620, 1172187917, 2884733762, 1368768587, 694906232, 1598751577, 1828254910, 352239543, 2039224980, 303092965, 3611442298, 256513635, 1259699184, 3939707825, 1580146294, 3327160399, 1408429452, 2996491197, 3625686706, 3083712891
Offset: 1
Links
Programs
-
Maple
a:= proc(n) option remember; `if`(n=1, 1, irem(134775813*a(n-1)+1, 2^32)) end: seq(a(n), n=1..23); # Alois P. Heinz, May 30 2025
-
Mathematica
NestList[Mod[134775813*# + 1, 2^32] &, 1, 50] (* Paolo Xausa, Jun 04 2025 *)
Formula
a(n) = (134775813 * a(n-1) + 1) mod 2^32.
Comments