cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A384236 Consecutive states of the linear congruential pseudo-random number generator (9806*s+1) mod (2^17-1) when started at s=1.

Original entry on oeis.org

1, 9807, 92400, 111649, 125103, 66530, 52814, 32564, 33629, 122410, 4243, 57352, 99123, 108674, 50015, 110480, 65066, 114640, 94945, 33358, 86404, 34681, 83713, 123077, 122366, 97063, 93248, 38593, 40982, 5807, 58629, 38569, 67780, 120711, 120937, 108886
Offset: 1

Views

Author

Sean A. Irvine, May 22 2025

Keywords

Comments

Periodic with period length 2^17-2.
In the way this generator was defined by Collins, it would return values in the range [1..2^17-1] rather than the more typical [0..2^17-2] (that is, 0 would instead be 2^17-1).

References

  • William J. Collins, Intermediate Pascal Programming, McGraw-Hill, 1986 (see p. 157).

Crossrefs

Cf. A096550-A096561 (other pseudo-random number generators).

Programs

  • Mathematica
    NestList[Mod[9806*#, 2^17 - 1] + 1 &, 1, 50] (* Paolo Xausa, May 23 2025 *)

Formula

a(n) = (9806 * a(n-1) mod (2^17-1)) + 1.