login
A385357
Consecutive states of the linear congruential pseudo-random number generator (1277*s + 24749) mod 117128 when started at s=1.
3
1, 26026, 112727, 26816, 67405, 11854, 52795, 95364, 108585, 8242, 8263, 35080, 79013, 77142, 30435, 3748, 8697, 3658, 10895, 116560, 2181, 115942, 32891, 94732, 4289, 113914, 19951, 85400, 34381, 6286, 87267, 75980, 69225, 110562, 73183, 11296, 42997, 116014
OFFSET
1,2
COMMENTS
Periodic with period 117128.
Described in Numerical Recipes as a "quick and dirty" generator.
FORMULA
a(n) = (1277 * a(n-1) + 24749) mod 117128.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
irem(1277*a(n-1)+24749, 117128))
end:
seq(a(n), n=1..44); # after Alois P. Heinz
MATHEMATICA
NestList[Mod[1277*# + 24749, 117128] &, 1, 50] (* after Paolo Xausa *)
CROSSREFS
Sequence in context: A238043 A236599 A326931 * A235195 A395006 A235740
KEYWORD
nonn,easy
AUTHOR
Sean A. Irvine, Jun 26 2025
STATUS
approved