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.

A385039 Consecutive internal states of the linear congruential pseudo-random number generator (171*s + 11213) mod 53125 when started at 1.

Original entry on oeis.org

1, 11384, 45377, 14430, 34993, 45016, 5824, 50867, 50095, 24333, 28406, 34264, 26607, 45385, 15798, 3296, 43579, 25722, 300, 9388, 22811, 33769, 48212, 21090, 5103, 33826, 4834, 40952, 1505, 2943, 36341, 9899, 3942, 47795, 2908, 30356, 48964, 43432, 585, 4998
Offset: 1

Views

Author

Sean A. Irvine, Jun 13 2025

Keywords

Comments

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

Formula

a(n) = (171*a(n-1) + 11213) mod 53125.