A384150 Consecutive states of the linear congruential pseudo-random number generator (10924*s+11830) mod (2^15+1) when started at s=1.
1, 22754, 23661, 2722, 25475, 26382, 5443, 28196, 29103, 8164, 30917, 31824, 10885, 869, 1776, 13606, 3590, 4497, 16327, 6311, 7218, 19048, 9032, 9939, 21769, 11753, 12660, 24490, 14474, 15381, 27211, 17195, 18102, 29932, 19916, 20823, 32653, 22637, 23544
Offset: 1
References
- Richard Lamb, Pascal: Structure and Style, Benjamin-Cummings, 1986 (see pp. 226-227).
Links
- Sean A. Irvine, Table of n, a(n) for n = 1..10000
- 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.
- W. E. Sharp and Carter Bays, A review of portable random number generators, Computers and Geosciences, 18, 1 (1982), 79-87.
- Index entries for sequences related to pseudo-random numbers.
- Index entries for linear recurrences with constant coefficients, order 32769.
Programs
-
Mathematica
NestList[Mod[10924*# + 11830, 2^15 + 1] &, 1, 100] (* Paolo Xausa, May 22 2025 *)
-
PARI
my(f=Mod(10924, 10923*32769)); \ a(n) = lift(22753*f^((n-1) % 32769) - 11830) /10923; \\ Kevin Ryde, May 22 2025
Formula
a(n) = (10924 * a(n-1) + 11830) mod (2^15+1).
Comments