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.

A384113 Consecutive states of a linear congruential pseudo-random number generator for MacModula-2 when started at 1.

Original entry on oeis.org

1, 13, 169, 2197, 829, 1533, 1441, 245, 874, 2118, 2113, 2048, 1203, 1773, 2250, 1518, 1246, 21, 273, 1238, 2228, 1232, 2150, 218, 523, 2177, 569, 464, 1410, 2153, 257, 1030, 1835, 745, 441, 1111, 577, 568, 451, 1241, 2267, 1739, 1808, 394, 500, 1878, 1304
Offset: 1

Views

Author

Sean A. Irvine, May 19 2025

Keywords

Comments

An example of a terrible random number generator.
Periodic with period 1155 (well below the modulus 2311).

References

  • Modula Corporation, MacModula-2 System Reference Manual, 1985 (see p. 41).

Crossrefs

Cf. A001022.
Cf. A096550-A096561 other pseudo-random number generators.
Cf. A383809 (another generator with a similar problem).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(13*a(n-1), 2311))
        end:
    seq(a(n), n=1..47);  # Alois P. Heinz, May 21 2025
  • Mathematica
    NestList[Mod[13*#, 2311] &, 1, 100] (* Paolo Xausa, May 22 2025 *)
  • PARI
    my(f=Mod(13,2311)); a(n) = lift(f^((n-1) % 1155)); \\ Kevin Ryde, May 25 2025

Formula

a(n) = 13 * a(n-1) mod 2311.

A384152 Consecutive states of the linear congruential pseudo-random number generator used by OMNITAB II when started at 1.

Original entry on oeis.org

1, 125, 7433, 3429, 2641, 2445, 2521, 3829, 3489, 1949, 6057, 3461, 6641, 2733, 5753, 6421, 8001, 701, 5705, 421, 3473, 8141, 1817, 5941, 5345, 4573, 6377, 2501, 1329, 2285, 7097, 2389, 3713, 5373, 8073, 1509, 209, 1549, 5209, 3957, 3105, 3101, 2601, 5637, 113
Offset: 1

Views

Author

Sean A. Irvine, May 20 2025

Keywords

Comments

Periodic with period length 2048.
A terrible generator with period much less than the modulus.
Also, RN5 of the IRCCRAND package.
Originally defined by Kruskal including the implementation s = 5*s mod 8192; s = 5*s mod 8192; s = 5*s mod 8192 (rather than s = 125*s mod 8192).

Crossrefs

Cf. A096550-A096561 (other pseudo-random number generators).
Cf. A383809, A384113, A384126, A384971, A384973 (other examples with short periods).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(125*a(n-1), 2^13))
        end:
    seq(a(n), n=1..45);  # Alois P. Heinz, May 21 2025
  • Mathematica
    NestList[Mod[125*#, 2^13] &, 1, 100] (* Paolo Xausa, May 21 2025 *)
  • PARI
    a(n) = lift(Mod(5,8192)^(3*n-3)) \\ Jianing Song, Jul 06 2025

Formula

a(n) = 125 * a(n-1) mod 2^13.

A384361 Consecutive internal states of the linear congruential pseudo-random number generator of the HP 48 series calculators when started at 999500333083533.

Original entry on oeis.org

999500333083533, 529199358633911, 43582181444437, 294922982088079, 41089642444893, 284830972469031, 786870433805477, 40703079813759, 869103111377453, 156083179654551, 561556952003317, 315753873725039, 722319935785213, 518159379358471, 201897051493957, 715330849773919
Offset: 1

Views

Author

Paolo Xausa, May 27 2025

Keywords

References

  • The initial 999500333083533 seed is the one used by the calculators after a memory clean; successive executions of the RAND command give the terms of this sequence (divided by 10^15 and truncated to 12 significant digits).
  • See links for more information.

Crossrefs

Cf. A384416 (starting at 1).
Cf. other pseudo-random number generators: A096550-A096561, A381318, A382535, A383809, A384081, A384221.

Programs

  • Mathematica
    NestList[Mod[2851130928467*#, 10^15] &, 999500333083533, 15]

Formula

a(1) = 999500333083533; for n > 1, a(n) = 2851130928467*a(n-1) mod 10^15.

A384416 Consecutive internal states of the linear congruential pseudo-random number generator of the HP 48 series calculators when started at 1.

Original entry on oeis.org

1, 2851130928467, 261097470970089, 335429755623563, 468090732667921, 287888716607107, 194022960814969, 298923961822523, 84062462462241, 191517259514547, 165777802909449, 436661297384683, 996040654470961, 669370619746787, 188023750085529, 201468430854043, 677208350742081
Offset: 1

Views

Author

Paolo Xausa, May 28 2025

Keywords

Comments

To initialize the seed to 1, use the RDZ command with an argument between 10^-16 and 10^-13 (for example, "1E-13 RDZ"). Successive executions of the RAND command give the terms of this sequence (divided by 10^15 and truncated to 12 significant digits).
After a memory clean, the calculators use the seed 999500333083533 (cf. A384361).
See the Meyers link for more information.
Periodic with period 10^14/2.

Crossrefs

Cf. A384361 (starting at the default seed).
Cf. other pseudo-random number generators: A096550-A096561, A381318, A382535, A383809, A384081, A384221.

Programs

  • Mathematica
    NestList[Mod[2851130928467*#, 10^15] &, 1, 20]

Formula

a(1) = 1; for n > 1, a(n) = 2851130928467*a(n-1) mod 10^15.
Showing 1-4 of 4 results.