A384565 Consecutive states of the linear congruential pseudo-random number generator 5*s mod 2^35 when started at s=1.
1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 15148937153, 7025209029, 766306777, 3831533885, 19157669425, 27068870389, 32265136841, 23886730733, 16354438561, 13052716069
Offset: 1
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..10000
- Peter G. Behrenz, Algorithm 133: Random, C ACM, 5, 11 (1962), p. 553.
- Index entries for sequences related to pseudo-random numbers.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(5*a(n-1), 2^35)) end: seq(a(n), n=1..26); # Alois P. Heinz, Jun 04 2025
-
Mathematica
k = 1; {k}~Join~Table[k = Mod[5*k, 2^35], {n, 2, 26}] (* Michael De Vlieger, Jun 04 2025 *)
Formula
a(n) = 5 * a(n-1) mod 2^35.
Comments