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.

Previous Showing 41-50 of 76 results. Next

A096552 Consecutive internal states of the linear congruential pseudo-random number generator MTH$RANDOM that is used in the VAX VMS Library.

Original entry on oeis.org

0, 1, 69070, 475628535, 3277404108, 772999773, 3877832058, 3821835443, 1662200408, 2044158073, 3788989926, 797919023, 2743624612, 1156259413, 1059494674, 584849259, 786050992, 3369345009, 3077427454, 1200308583, 2654771836, 1692139853, 4052415402, 1850655011
Offset: 1

Views

Author

Hugo Pfoertner, Jul 18 2004

Keywords

Comments

This generator is a variant of A096551.

Crossrefs

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

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 0,
          irem(69069 *a(n-1)+1, 4294967296))
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Jun 10 2014
  • Mathematica
    NestList[Mod[#*69069 + 1, 2^32] &, 0, 50] (* Paolo Xausa, Aug 29 2024 *)

Formula

a(1)=0, a(n) = (69069*a(n-1)+1) mod 2^32. The sequence is periodic with period length 2^32. [Corrected based on a comment from Kevin Ryde, Nov 13 2024]

A096554 Output of the linear congruential pseudo-random number generator used in function rand() as described in Kernighan and Ritchie, when seeded with 0.

Original entry on oeis.org

0, 21468, 9988, 22117, 3498, 16927, 16045, 19741, 12122, 8410, 12261, 27052, 5659, 9758, 21087, 25875, 32368, 26233, 15212, 17661, 20496, 8191, 23065, 23471, 32096, 10781, 14596, 23212, 24244, 5661, 514, 25643, 1350, 19576, 8051, 18234, 16882, 13023, 5983, 21166
Offset: 1

Views

Author

Hugo Pfoertner, Jul 18 2004

Keywords

Comments

This sequence and A061364 are generated by the same algorithm but with different seed: A061364 (as well as A096553 which is the sequence of internal states of the generator) has seed 1, while this sequence has seed 0. [Corrected by Jean-Claude Arbaut, Oct 05 2015]

References

  • Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language (Second Edition), Prentice Hall Software Series, 1988, page 46.

Crossrefs

Cf. A096550-A096561 for other pseudo-random number generators.
A061364 is the same generator seeded with 1.

Programs

  • C
    static unsigned int next = 0; int rand( ) { next = next * 1103515245 + 12345; return ((next >>16) & 32767); }
    
  • Mathematica
    BitShiftRight[NestList[Mod[#*1103515245 + 12345, 2^31] &, 12345, 50], 16] (* Paolo Xausa, Aug 29 2024 *)
  • PARI
    x(n) = if(n<1, 0, (1103515245 * x(n-1) + 12345) % (2^31));
    vector(100, n, floor(x(n)/2^16)) \\ Altug Alkan, Oct 05 2015

Formula

Correction of seed value and second formula from David Fifield, May 23 2024: (Start)
x(0) = 0, x(n) = (1103515245 * x(n-1) + 12345) mod 2^31, a(n) = floor(x(n)/2^16).
a(n) = A061364(n + 1212780038). (End)

Extensions

Name amended (start at 0) by David Fifield, May 23 2024

A096556 Consecutive internal states of the linear congruential pseudo-random number generator used in the Watcom FORTRAN Function URAND when started with SEED=0.

Original entry on oeis.org

0, 453816693, 2013878382, 1461722811, 653338732, 1830525137, 1741773690, 526418231, 109789464, 1577774445, 1454795974, 1716389619, 180917764, 1381854025, 70154322, 301698031, 2068689712, 1594166885, 1923590686, 579939371, 2056610972, 914297537, 1800695338, 1283998631
Offset: 1

Views

Author

Hugo Pfoertner, Jul 20 2004

Keywords

Crossrefs

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

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 0,
          irem(2147437301 * a(n-1) +453816693, 2147483648))
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Jun 10 2014
  • Mathematica
    NestList[Mod[#*2147437301 + 453816693, 2^31] &, 0, 50] (* Paolo Xausa, Aug 29 2024 *)

Formula

a(1)=0, a(n) = ( 2147437301 * a(n-1) + 453816693 ) mod 2^31. The sequence is periodic with period length 2^31.

A382305 Consecutive internal states of the linear congruential pseudo-random number rand48 for Unix when started at 1.

Original entry on oeis.org

1, 25214903928, 206026503483683, 245470556921330, 105707381795861, 223576932655868, 102497929776471, 87262199322646, 266094224901481, 44061996164032, 147838658590923, 157704700760186, 262146585501693, 99421425265860, 6056585619327, 169186298309406
Offset: 1

Views

Author

Sean A. Irvine, Jun 08 2025

Keywords

Comments

Periodic with period 2^48.
A widely used generator because it is included in POSIX glibc.
Also used internally by Java in java.util.Random.
Also provided by the GNU Scientific Library.

Crossrefs

Cf. A096550-A096561 (other pseudo-random number generators).

Programs

  • Mathematica
    NestList[Mod[25214903917*# + 11, 2^48] &, 1, 30] (* Paolo Xausa, Jun 09 2025 *)

Formula

a(n) = (25214903917 * a(n-1) + 11) mod 2^48.

A382684 Consecutive internal states of the linear congruential pseudo-random number generator for BCPL when started at 1.

Original entry on oeis.org

1, 2862137630, 1410400247, 1369397724, 1652384221, 2669374922, 2140954419, 1701427304, 2594835833, 3034226998, 3288120879, 389815220, 357129941, 541493090, 3104757995, 2854522816, 2013295089, 2081295438, 2466720615, 4256030860, 3056739021, 751492090
Offset: 1

Views

Author

Sean A. Irvine, Jun 02 2025

Keywords

Comments

Periodic with period 2^32.

Crossrefs

Cf. A096550-A096561 (other pseudo-random number generators).
Cf. A084277 (visible state).

Programs

  • Mathematica
    NestList[Mod[2147001325*# + 715136305, 2^32] &, 1, 50] (* Paolo Xausa, Jun 04 2025 *)

Formula

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

A383645 Consecutive internal states of the linear congruential pseudo-random number generator (17405*s+10395331) mod 2^24 when started at s=1.

Original entry on oeis.org

1, 10412736, 16578179, 2262842, 2257173, 4251524, 3870775, 3934750, 10123369, 13310344, 356907, 14791746, 14354941, 11842764, 8826975, 14928294, 8608209, 15734096, 7839443, 6803018, 3333093, 7266068, 9654663, 9209390, 10306617, 15070744, 4922491, 5109074
Offset: 1

Views

Author

Sean A. Irvine, May 23 2025

Keywords

Comments

Periodic with period 2^24.
This random number generator was used by some versions of IBM BASIC (Schneider).

References

  • David I. Schneider, Handbook of BASIC (3rd ed.), Simon & Schuster, 1988 (see p. 497).

Crossrefs

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

Programs

  • Mathematica
    NestList[Mod[17405*# + 10395331, 2^24] &, 1, 50] (* Paolo Xausa, May 26 2025 *)

Formula

a(n) = (17405 * a(n-1) + 10395331) mod 2^24.

A384082 Consecutive states of the linear congruential pseudo-random number generator (61*s+323) mod 500 when started at s=1.

Original entry on oeis.org

1, 384, 247, 390, 113, 216, 499, 262, 305, 428, 431, 114, 277, 220, 243, 146, 229, 292, 135, 58, 361, 344, 307, 50, 373, 76, 459, 322, 465, 188, 291, 74, 337, 380, 3, 6, 189, 352, 295, 318, 221, 304, 367, 210, 133, 436, 419, 382, 125, 448, 151, 34, 397, 40
Offset: 1

Views

Author

Sean A. Irvine, May 18 2025

Keywords

Comments

Periodic with period length 500.
Originally defined by Lamie in the form (61*s+2323) mod 500, even though 2323 > 500.

References

  • Edward L. Lamie, Pascal Programming, John Wiley and Sons, 1987 (see p. 150).

Crossrefs

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

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(61*a(n-1)+323, 500))
        end:
    seq(a(n), n=1..54);  # Alois P. Heinz, May 21 2025
  • Mathematica
    NestList[Mod[61*# + 323, 500] &, 1, 100] (* Paolo Xausa, May 19 2025 *)

Formula

a(n) = (61*a(n-1) + 323) mod 500.

A384085 Consecutive states of the linear congruential pseudo-random number generator (40*s+725) mod 729 when started at s=1.

Original entry on oeis.org

1, 36, 707, 574, 357, 425, 229, 408, 278, 181, 675, 23, 187, 186, 146, 4, 156, 404, 118, 342, 554, 286, 501, 353, 265, 390, 287, 541, 495, 113, 142, 573, 317, 283, 381, 656, 721, 405, 158, 484, 402, 38, 58, 129, 53, 658, 72, 689, 583, 717, 245, 319, 363, 665
Offset: 1

Views

Author

Sean A. Irvine, May 18 2025

Keywords

Comments

Periodic with period 729.
Originally defined by Savitch in the form (40*s+3641) mod 729, even though 3641 > 729.

References

  • Walter J. Savitch, Pascal: An Introduction to the Art and Science of Programming, Benjamin Cummings, 1984 (see p. 244).

Crossrefs

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

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(40*a(n-1)+725, 729))
        end:
    seq(a(n), n=1..54);  # Alois P. Heinz, May 18 2025
  • Mathematica
    NestList[Mod[40*# + 725, 729] &, 1, 100] (* Paolo Xausa, May 22 2025 *)

Formula

a(n) = (40*a(n-1) + 725) mod 729.

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.

A384316 Consecutive states of the linear congruential pseudo-random number generator 3125*s mod 2^26 when started at s=1.

Original entry on oeis.org

1, 3125, 9765625, 50153869, 31643185, 33596453, 30652329, 24179197, 62518625, 16800021, 20933977, 54644589, 39390609, 17996549, 1987593, 37212637, 56938177, 26204661, 16751545, 3664205, 42133745, 361957, 57373801, 45352381, 59378721, 2494165, 9637401, 52107053
Offset: 1

Views

Author

Sean A. Irvine, May 25 2025

Keywords

Comments

Periodic with period 2^24 (considerably less than the modulus).

Crossrefs

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

Programs

  • Mathematica
    NestList[Mod[3125*#, 2^26] &, 1, 50] (* Paolo Xausa, May 27 2025 *)

Formula

a(n) = 3125 * a(n-1) mod 2^26.
Previous Showing 41-50 of 76 results. Next