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.

A384082 Consecutive states of the linear congruential pseudo-random number generator (61*s+323) mod 500 when started at s=1.

Original entry on oeis.org

1, 384, 247, 390, 113, 216, 499, 262, 305, 428, 431, 114, 277, 220, 243, 146, 229, 292, 135, 58, 361, 344, 307, 50, 373, 76, 459, 322, 465, 188, 291, 74, 337, 380, 3, 6, 189, 352, 295, 318, 221, 304, 367, 210, 133, 436, 419, 382, 125, 448, 151, 34, 397, 40
Offset: 1

Views

Author

Sean A. Irvine, May 18 2025

Keywords

Comments

Periodic with period length 500.
Originally defined by Lamie in the form (61*s+2323) mod 500, even though 2323 > 500.

References

  • Edward L. Lamie, Pascal Programming, John Wiley and Sons, 1987 (see p. 150).

Crossrefs

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

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(61*a(n-1)+323, 500))
        end:
    seq(a(n), n=1..54);  # Alois P. Heinz, May 21 2025
  • Mathematica
    NestList[Mod[61*# + 323, 500] &, 1, 100] (* Paolo Xausa, May 19 2025 *)

Formula

a(n) = (61*a(n-1) + 323) mod 500.