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

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

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

Original entry on oeis.org

1, 20613, 424895769, 938169853, 404929649, 1693398709, 828374025, 631292077, 1220159969, 1976439269, 430365689, 2020481117, 2026879057, 763630101, 1799615721, 1993805069, 1909315521, 1935501125, 533477081, 1446792893, 636483633, 859521397, 574460361, 126586221
Offset: 1

Views

Author

Sean A. Irvine, May 20 2025

Keywords

Comments

Periodic with period 2^29 (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

  • Mathematica
    NestList[Mod[20613*#, 2^31] &, 1, 23] (* Stefano Spezia, May 24 2025 *)

Formula

a(n) = 20613 * a(n-1) mod 2^31.

A384565 Consecutive states of the linear congruential pseudo-random number generator 5*s mod 2^35 when started at s=1.

Original entry on oeis.org

1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 15148937153, 7025209029, 766306777, 3831533885, 19157669425, 27068870389, 32265136841, 23886730733, 16354438561, 13052716069
Offset: 1

Views

Author

Sean A. Irvine, Jun 04 2025

Keywords

Comments

Periodic with period 2^35.
A terrible generator that should not be used.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(5*a(n-1), 2^35))
        end:
    seq(a(n), n=1..26);  # Alois P. Heinz, Jun 04 2025
  • Mathematica
    k = 1; {k}~Join~Table[k = Mod[5*k, 2^35], {n, 2, 26}] (* Michael De Vlieger, Jun 04 2025 *)

Formula

a(n) = 5 * a(n-1) mod 2^35.

A384610 Consecutive states of the linear congruential pseudo-random number generator (262145*s+3) mod 2^35 when started at s=1.

Original entry on oeis.org

1, 262148, 1310727, 3145738, 5767181, 9175056, 13369363, 18350102, 24117273, 30670876, 38010911, 46137378, 55050277, 64749608, 75235371, 86507566, 98566193, 111411252, 125042743, 139460666, 154665021, 170655808, 187433027, 204996678, 223346761, 242483276
Offset: 1

Views

Author

Sean A. Irvine, Jun 04 2025

Keywords

Comments

Periodic with period 2^35.

References

  • Donald E. Knuth, The Art of Computer Programming, Vol 2: Seminumerical Algorithms (3rd ed.), Addison-Wesley, 1998 (see p. 106).

Crossrefs

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

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(262145*a(n-1)+3, 2^35))
        end:
    seq(a(n), n=1..26);  # Alois P. Heinz, Jun 04 2025
  • Mathematica
    NestList[Mod[262145*# + 3, 2^35] &, 1, 30] (* Paolo Xausa, Jun 12 2025 *)

Formula

a(n) = (262145 * a(n-1) + 3) mod 2^35.
Showing 1-4 of 4 results.