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.

A384934 Consecutive states of the linear congruential pseudo-random number generator 254*s mod (2^16+1) when started at s=1.

Original entry on oeis.org

1, 254, 64516, 2814, 59386, 10534, 54156, 58391, 19952, 21459, 11015, 45256, 26049, 62746, 11993, 31520, 10566, 62284, 25719, 44463, 21238, 20418, 8749, 59525, 45840, 43311, 56315, 16944, 43871, 1944, 35017, 46823, 30845, 35727, 30552, 26842, 2020, 54321
Offset: 1

Views

Author

Sean A. Irvine, Jun 12 2025

Keywords

Comments

Periodic with period 2^16.

Crossrefs

Cf. A357907.

Programs

  • Mathematica
    NestList[Mod[254*#, 2^16 + 1] &, 1, 50] (* Paolo Xausa, Jun 13 2025 *)

Formula

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

A384961 Consecutive states of the linear congruential pseudo-random number generator (257*s + 41) mod 2^16 when started at s=1.

Original entry on oeis.org

1, 298, 11091, 32380, 64165, 40910, 28151, 25888, 34121, 52850, 16539, 56260, 40941, 36118, 41791, 57960, 19089, 56250, 38371, 30988, 34101, 47710, 6279, 40880, 20441, 10498, 11051, 22100, 43645, 10150, 52687, 40184, 38177, 46666, 115, 29596, 4037, 54510
Offset: 1

Views

Author

Sean A. Irvine, Jun 13 2025

Keywords

Comments

Periodic with period 2^16.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(257*a(n-1)+41, 2^16))
        end:
    seq(a(n), n=1..38);  # Alois P. Heinz, Jun 13 2025
  • Mathematica
    NestList[Mod[257*# + 41, 2^16] &, 1, 50] (* Paolo Xausa, Jun 18 2025 *)

Formula

a(n) = (257 * a(n-1) + 41) mod 2^16.
Showing 1-2 of 2 results.