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.

A384152 Consecutive states of the linear congruential pseudo-random number generator used by OMNITAB II when started at 1.

Original entry on oeis.org

1, 125, 7433, 3429, 2641, 2445, 2521, 3829, 3489, 1949, 6057, 3461, 6641, 2733, 5753, 6421, 8001, 701, 5705, 421, 3473, 8141, 1817, 5941, 5345, 4573, 6377, 2501, 1329, 2285, 7097, 2389, 3713, 5373, 8073, 1509, 209, 1549, 5209, 3957, 3105, 3101, 2601, 5637, 113
Offset: 1

Views

Author

Sean A. Irvine, May 20 2025

Keywords

Comments

Periodic with period length 2048.
A terrible generator with period much less than the modulus.
Also, RN5 of the IRCCRAND package.
Originally defined by Kruskal including the implementation s = 5*s mod 8192; s = 5*s mod 8192; s = 5*s mod 8192 (rather than s = 125*s mod 8192).

Crossrefs

Cf. A096550-A096561 (other pseudo-random number generators).
Cf. A383809, A384113, A384126, A384971, A384973 (other examples with short periods).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(125*a(n-1), 2^13))
        end:
    seq(a(n), n=1..45);  # Alois P. Heinz, May 21 2025
  • Mathematica
    NestList[Mod[125*#, 2^13] &, 1, 100] (* Paolo Xausa, May 21 2025 *)
  • PARI
    a(n) = lift(Mod(5,8192)^(3*n-3)) \\ Jianing Song, Jul 06 2025

Formula

a(n) = 125 * a(n-1) mod 2^13.