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.

A384158 Consecutive states of the linear congruential pseudo-random number generator for 16-bit WATFOR/WATFIV when started at 1.

Original entry on oeis.org

1, 253, 31241, 6885, 5201, 5133, 20697, 26229, 16801, 23581, 2217, 3845, 22513, 26925, 29049, 9365, 10049, 19261, 23369, 14117, 32657, 4685, 5657, 22197, 12513, 20061, 29161, 4933, 2865, 3949, 16057, 31957, 24193, 25981, 19593, 9061, 31441, 24717, 27481, 5877
Offset: 1

Views

Author

Sean A. Irvine, May 20 2025

Keywords

Comments

Periodic with period 8192 (considerably less than the modulus).
WATFOR and WATFIV are early FORTRAN compilers from the University of Waterloo.

References

  • Terry M. Walker, Fundamentals of Fortran Programming: with WATFOR/WATFIV, Allyn and Bacon, 1975.

Crossrefs

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

Programs

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

Formula

a(n) = 253 * a(n-1) mod 2^15.
a(n) == 1 (mod 4). - Hugo Pfoertner, May 26 2025