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.

Showing 1-1 of 1 results.

A383940 Consecutive states of the linear congruential pseudo-random number generator (25173*s+13849) mod 2^16 when started at s=1.

Original entry on oeis.org

1, 39022, 61087, 20196, 45005, 3882, 21259, 65216, 19417, 30502, 20919, 26076, 16421, 44130, 63139, 32824, 14513, 51934, 36303, 35284, 8573, 11930, 41787, 65200, 9865, 29590, 743, 39628, 46037, 30162, 47315, 23080, 30049, 20814, 4351, 30916, 22317, 25098
Offset: 1

Views

Author

Sean A. Irvine, May 21 2025

Keywords

Comments

Periodic with period 2^16.
This was a popular generator in the 1980's due to Grogono's book, but the period was too short for serious scientific use.

References

  • Peter Grogono, Programming in Pascal (2nd ed.), Addison-Wesley, 1984 (see pp. 136-137).

Crossrefs

Cf. A096550-A096561 (other pseudo-random number generators).
Cf. A384082, A384085, A384150, A384194 (other early generators for Pascal).
Cf. A384220 (similar generator for Smalltalk-80).

Programs

  • Mathematica
    NestList[Mod[25173*# + 13849, 2^16] &, 1, 100] (* Paolo Xausa, May 22 2025 *)

Formula

a(n) = (25173 * a(n-1) + 13849) mod 2^16.
Showing 1-1 of 1 results.