A384113 Consecutive states of a linear congruential pseudo-random number generator for MacModula-2 when started at 1.
1, 13, 169, 2197, 829, 1533, 1441, 245, 874, 2118, 2113, 2048, 1203, 1773, 2250, 1518, 1246, 21, 273, 1238, 2228, 1232, 2150, 218, 523, 2177, 569, 464, 1410, 2153, 257, 1030, 1835, 745, 441, 1111, 577, 568, 451, 1241, 2267, 1739, 1808, 394, 500, 1878, 1304
Offset: 1
References
- Modula Corporation, MacModula-2 System Reference Manual, 1985 (see p. 41).
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..1155
- Stephen K. Park and Keith W. Miller, Random number generators: good ones are hard to find, Communications of the ACM, Vol 31, 10 (1988), 192-201.
- Index entries for sequences related to pseudo-random numbers.
- Index entries for linear recurrences with constant coefficients, order 1155.
Crossrefs
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, n, irem(13*a(n-1), 2311)) end: seq(a(n), n=1..47); # Alois P. Heinz, May 21 2025
-
Mathematica
NestList[Mod[13*#, 2311] &, 1, 100] (* Paolo Xausa, May 22 2025 *)
-
PARI
my(f=Mod(13,2311)); a(n) = lift(f^((n-1) % 1155)); \\ Kevin Ryde, May 25 2025
Formula
a(n) = 13 * a(n-1) mod 2311.
Comments