A384221 Consecutive states of the linear congruential pseudo-random number generator for the Texas Instruments TI99 when started at 1.
1, 60062, 56335, 54564, 49133, 60602, 58139, 22240, 20761, 56598, 51559, 19676, 40837, 55218, 39667, 29464, 55089, 14478, 41919, 50580, 25629, 39850, 28619, 32848, 62025, 56582, 51991, 8012, 28085, 6306, 49571, 24200, 609, 43646, 40815, 14852, 7245, 11930
Offset: 1
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..10000
- Lee Stewart, RND and RAND: Pseudorandom Number Generation by TI Basic, 2018.
- Index entries for sequences related to pseudo-random numbers.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(28645*a(n-1)+31417, 2^16)) end: seq(a(n), n=1..38); # Alois P. Heinz, May 22 2025
-
Mathematica
NestList[Mod[28645*# + 31417, 2^16] &, 1, 50] (* Paolo Xausa, May 23 2025 *)
Formula
a(n) = (28645 * a(n-1) + 31417) mod 2^16.
Comments