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.

A385002 Consecutive states of the linear congruential pseudo-random number generator (211*s + 1663) mod 7875 when started at s=1.

Original entry on oeis.org

1, 1874, 3327, 2785, 6548, 5166, 4939, 4292, 1650, 3313, 7706, 5379, 2632, 5765, 5328, 7621, 3194, 6222, 7255, 4718, 4911, 6259, 7187, 6120, 1483, 7451, 6699, 5527, 2360, 3498, 7366, 4514, 1242, 3850, 2888, 4656, 7579, 2207, 2715, 7528, 7196, 144, 547, 6830
Offset: 1

Views

Author

Sean A. Irvine, Jun 14 2025

Keywords

Comments

Periodic with period 7875.
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(211*a(n-1)+1663, 7875))
        end:
    seq(a(n), n=1..44);  # Alois P. Heinz, Jun 14 2025
  • Mathematica
    NestList[Mod[211*# + 1663, 7875] &, 1, 50] (* Paolo Xausa, Jun 17 2025 *)

Formula

a(n) = (211 * a(n-1) + 1663) mod 7875.