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.

A383809 Consecutive states of a linear congruential pseudo-random number generator for Lisp 1985 when started at 1.

Original entry on oeis.org

1, 17, 38, 144, 189, 201, 154, 108, 79, 88, 241, 81, 122, 66, 118, 249, 217, 175, 214, 124, 100, 194, 35, 93, 75, 20, 89, 7, 119, 15, 4, 68, 152, 74, 3, 51, 114, 181, 65, 101, 211, 73, 237, 13, 221, 243, 115, 198, 103, 245, 149, 23, 140, 121, 49, 80, 105, 28
Offset: 1

Views

Author

Sean A. Irvine, May 17 2025

Keywords

Comments

An example of a terrible random number generator.
Periodic with period 125 (well below the modulus of 251).

Crossrefs

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

Programs

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

Formula

a(n) = 17 * a(n-1) mod 251.