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.

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

Original entry on oeis.org

1, 27098671254, 18133949355, 29915928896, 3603063125, 10857477098, 18963943679, 33905981588, 2923784873, 26309797694, 19448475219, 27691073512, 25834363901, 26836992658, 18737148839, 4649447228, 8402072913, 11454449126, 27253858555, 3793372816, 1047688869
Offset: 1

Views

Author

Sean A. Irvine, Jun 04 2025

Keywords

Comments

Periodic with period 2^35.
The first set of numbers on p. 156 of Hirsh is reproduced by s/2^35 starting with s=4818528277.

References

  • Seymour C. Hirsh, BASIC Programming Self-Taught, Reston Pub Co, Reston, VA, 1980 (see p. 156).
  • 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(129*a(n-1)+27098671125, 2^35))
        end:
    seq(a(n), n=1..21);  # Alois P. Heinz, Jun 04 2025
  • Mathematica
    NestList[Mod[129*# + 27098671125, 2^35] &, 1, 30] (* Paolo Xausa, Jun 12 2025 *)

Formula

a(n) = (129*a(n-1) + 27098671125) 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-2 of 2 results.