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-3 of 3 results.

A384404 Consecutive states of the linear congruential pseudo-random number generator for Turbo Pascal when started at 1.

Original entry on oeis.org

1, 134775814, 3698175007, 870078620, 1172187917, 2884733762, 1368768587, 694906232, 1598751577, 1828254910, 352239543, 2039224980, 303092965, 3611442298, 256513635, 1259699184, 3939707825, 1580146294, 3327160399, 1408429452, 2996491197, 3625686706, 3083712891
Offset: 1

Views

Author

Sean A. Irvine, May 30 2025

Keywords

Comments

Periodic with period 2^32.
Also used by Borland Delphi and Virtual Pascal.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 1,
          irem(134775813*a(n-1)+1, 2^32))
        end:
    seq(a(n), n=1..23);  # Alois P. Heinz, May 30 2025
  • Mathematica
    NestList[Mod[134775813*# + 1, 2^32] &, 1, 50] (* Paolo Xausa, Jun 04 2025 *)

Formula

a(n) = (134775813 * a(n-1) + 1) mod 2^32.

A384220 Consecutive states of the linear congruential pseudo-random number generator for Smalltalk-80 when started at 1.

Original entry on oeis.org

1, 41030, 24167, 29748, 11069, 4562, 19459, 53408, 8761, 54302, 60255, 60364, 8437, 29482, 55419, 12728, 9073, 15094, 28503, 52836, 58797, 14210, 52211, 44496, 58281, 13518, 51791, 31740, 22885, 48858, 1643, 42216, 17121, 8614, 56391, 21652, 23581, 26930
Offset: 1

Views

Author

Sean A. Irvine, May 22 2025

Keywords

Comments

Periodic with period 2^16.
This generator was widely used with Smalltalk-80 due to the Goldberg and Robson book.

References

  • Adele Goldberg and David Robson, Smalltak-80: The Language and Its Implementation, Addison-Wesley, 1983 (see p. 152).

Crossrefs

Cf. A383940 (similar generator for Pascal).
Cf. A096550-A096561 other pseudo-random number generators.

Programs

  • Mathematica
    NestList[Mod[27181*# + 13849, 2^16] &, 1, 50] (* Paolo Xausa, May 23 2025 *)

Formula

a(n) = (27181 * a(n-1) + 13849) mod 2^16.

A384339 Consecutive states of the linear congruential pseudo-random number generator for Berkeley Pascal 3.1 when started at 1.

Original entry on oeis.org

1, 113280614, 518180871, 401789364, 123511293, 522841650, 132082531, 254284640, 306822585, 36791486, 267986559, 195744204, 63672117, 39581194, 434609499, 223082744, 48501361, 535916054, 463875063, 53294308, 487523181, 390617314, 240119379, 401404304, 176021033
Offset: 1

Views

Author

Sean A. Irvine, May 26 2025

Keywords

Comments

Periodic with period 2^29.
The default initial seed is 7774755, but 1 is used here for consistency with other OEIS sequences.

Crossrefs

Cf. A383940, A384150, A384194, A384236 (other Pascal generators).

Programs

  • Mathematica
    NestList[Mod[62605*# + 113218009, 2^29] &, 1, 50] (* Paolo Xausa, May 27 2025 *)

Formula

a(n) = (62605 * a(n-1) + 113218009) mod 2^29.
Showing 1-3 of 3 results.