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.

A385036 Consecutive states of the linear congruential pseudo-random number generator (419*s + 6173) mod 29282 when started at s=1.

Original entry on oeis.org

1, 6592, 15713, 1470, 7181, 28248, 12157, 4888, 4505, 19720, 11329, 9340, 25127, 22148, 3791, 13374, 17017, 20770, 12049, 18200, 18653, 3486, 2707, 27690, 12611, 19422, 3595, 19096, 13411, 3238, 15923, 1614, 8953, 9384, 14281, 16384, 19081, 7126, 5203, 19362
Offset: 1

Views

Author

Sean A. Irvine, Jun 16 2025

Keywords

Comments

Periodic with period 29282.
Described in Numerical Recipes as a "quick and dirty" generator.

References

  • William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Numerical Recipes in C (2nd ed), Cambridge University Press, 1999 (see p. 285).

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(419*a(n-1)+6173, 29282))
        end:
    seq(a(n), n=1..44);  # after Alois P. Heinz
  • Mathematica
    NestList[Mod[419*# + 6173, 29282] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)

Formula

a(n) = (419 * a(n-1) + 6173) mod 29282.