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.

A385037 Consecutive states of the linear congruential pseudo-random number generator (936*s + 1399) mod 6655 when started at s=1.

Original entry on oeis.org

1, 2335, 4119, 3538, 5432, 1331, 2730, 1159, 1458, 1812, 406, 2080, 5019, 753, 777, 3276, 6435, 1784, 818, 1722, 2681, 1880, 4159, 1048, 4042, 4671, 1120, 4884, 838, 477, 1986, 3550, 3354, 6238, 3732, 676, 1910, 5619, 3333, 6547, 136, 2250, 4419, 4828, 1662
Offset: 1

Views

Author

Sean A. Irvine, Jun 14 2025

Keywords

Comments

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

Formula

a(n) = (936 * a(n-1) + 1399) mod 6655.