login
A384113
Consecutive states of a linear congruential pseudo-random number generator for MacModula-2 when started at 1.
11
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,2
COMMENTS
An example of a terrible random number generator.
Periodic with period 1155 (well below the modulus 2311).
REFERENCES
Modula Corporation, MacModula-2 System Reference Manual, 1985 (see p. 41).
FORMULA
a(n) = 13 * a(n-1) mod 2311.
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 *)
PROG
(PARI) my(f=Mod(13, 2311)); a(n) = lift(f^((n-1) % 1155)); \\ Kevin Ryde, May 25 2025
CROSSREFS
Cf. A001022.
Cf. A096550-A096561 other pseudo-random number generators.
Cf. A383809 (another generator with a similar problem).
Sequence in context: A188869 A014956 A171287 * A045593 A045597 A045600
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, May 19 2025
STATUS
approved