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.

Showing 1-2 of 2 results.

A385336 Consecutive states of the linear congruential pseudo-random number generator (1541*s + 2957) mod 14000 when started at s=1.

Original entry on oeis.org

1, 4498, 4375, 10832, 7069, 4286, 13683, 4460, 1817, 2954, 5071, 5368, 1045, 3302, 9339, 2356, 7553, 8130, 1287, 12224, 10141, 6238, 11715, 9772, 11609, 426, 1423, 11800, 757, 7494, 1211, 7108, 8385, 2242, 13879, 12496, 9293, 1470, 227, 2764, 6281, 7978, 5055
Offset: 1

Views

Author

Sean A. Irvine, Jun 25 2025

Keywords

Comments

Periodic with period 14000.
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(1541*a(n-1)+2957, 14000))
        end:
    seq(a(n), n=1..44);  # after Alois P. Heinz
  • Mathematica
    NestList[Mod[1541*# + 2957, 14000] &, 1, 50] (* after Paolo Xausa *)

Formula

a(n) = (1541 * a(n-1) + 2957) mod 14000.

A385339 Consecutive states of the linear congruential pseudo-random number generator (1255*s + 6173) mod 29282 when started at s=1.

Original entry on oeis.org

1, 7428, 16637, 7542, 13297, 3168, 28943, 19958, 17353, 27662, 22813, 27974, 4425, 25250, 11799, 26508, 9361, 12146, 22763, 23788, 21755, 17874, 8031, 12070, 15229, 26704, 21085, 26202, 5997, 6934, 11589, 26496, 23583, 28018, 1081, 15856, 22975, 26310, 24409
Offset: 1

Views

Author

Sean A. Irvine, Jun 25 2025

Keywords

Comments

Periodic with period 29282.
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(1255*a(n-1)+6173, 29282))
        end:
    seq(a(n), n=1..44);  # after Alois P. Heinz
  • Mathematica
    NestList[Mod[1255*# + 6173, 29282] &, 1, 50] (* after Paolo Xausa *)

Formula

a(n) = (1255 * a(n-1) + 6173) mod 29282.
Showing 1-2 of 2 results.