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.

A384150 Consecutive states of the linear congruential pseudo-random number generator (10924*s+11830) mod (2^15+1) when started at s=1.

Original entry on oeis.org

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

Views

Author

Sean A. Irvine, May 21 2025

Keywords

Comments

Periodic with period 32769.
This generator was given in Pascal by Richard Lamb in 1986. It was a reasonable generator for its time (with full period), but the period is way too small for modern use.

References

  • Richard Lamb, Pascal: Structure and Style, Benjamin-Cummings, 1986 (see pp. 226-227).

Crossrefs

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

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).