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 11-20 of 76 results. Next

A384400 Consecutive states of the linear congruential pseudo-random number generator 40692*s mod (2^31-249) when started at s=1.

Original entry on oeis.org

1, 40692, 1655838864, 2103410263, 1872071452, 652912057, 1780294415, 535353314, 525453832, 1422611300, 1336516156, 498340277, 1924298326, 2007787254, 2020508212, 2118231989, 1554910725, 1123836963, 514716691, 445999725, 238604751, 532080813, 504813878
Offset: 1

Views

Author

Sean A. Irvine, May 27 2025

Keywords

Comments

Periodic with period 2^31-250.
Implemented as gsl rng lecuyer21 in the GNU Scientific Library.

Crossrefs

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

Programs

  • Mathematica
    NestList[Mod[40692*#, 2^31 - 249] &, 1, 50] (* Paolo Xausa, May 30 2025 *)

Formula

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

A384401 Consecutive states of the linear congruential pseudo-random number generator 40014*s mod (2^31-85) when started at s=1.

Original entry on oeis.org

1, 40014, 1601120196, 1346387765, 439883729, 732249858, 2127568003, 1962667596, 707287434, 1860990862, 1695805043, 1904850491, 53445315, 1814689225, 112933431, 612891482, 2124954851, 479214492, 407948861, 643161691, 28884682, 445508654, 322224693, 7553450
Offset: 1

Views

Author

Sean A. Irvine, May 27 2025

Keywords

Comments

Periodic with period 2^31-86.

Crossrefs

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

Programs

  • Mathematica
    NestList[Mod[40014*#, 2^31 - 85] &, 1, 50] (* Paolo Xausa, May 30 2025 *)

Formula

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

A384402 Consecutive states of the linear congruential pseudo-random number generator 39373*s mod (2^31-1) when started at s=1.

Original entry on oeis.org

1, 39373, 1550233129, 1548773083, 2044440394, 1622092461, 482805173, 2110316932, 1218777559, 1406738292, 1756031139, 1978020682, 2113853931, 894602131, 142925769, 1009147697, 429837187, 1808425391, 1165119911, 1868072236, 293238278, 798633422, 1138165032
Offset: 1

Views

Author

Sean A. Irvine, May 27 2025

Keywords

Comments

Periodic with period 2^31-2.

Crossrefs

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

Programs

  • Mathematica
    NestList[Mod[39373*#, 2^31 - 1] &, 1, 50] (* Paolo Xausa, May 30 2025 *)

Formula

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

A384746 Consecutive states of the linear congruential pseudo-random number generator MCNP from Los Alamos when started at 1.

Original entry on oeis.org

1, 19073486328125, 29763723208841, 187205367447973, 131230026111313, 264374031214925, 74735272014937, 31978779697717, 72377397341089, 127824407320157, 39323977335081, 168134765887429, 73951303845617, 27971537168493, 266449281326841, 41546074810965
Offset: 1

Views

Author

Sean A. Irvine, Jun 09 2025

Keywords

Comments

Periodic with period 2^46.
Used for Monte Carlo simulations.

Crossrefs

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

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(5^19*a(n-1), 2^48))
        end:
    seq(a(n), n=1..16);  # Alois P. Heinz, Jun 09 2025
  • Mathematica
    NestList[Mod[5^19*#, 2^48] &, 1, 30] (* Paolo Xausa, Jun 11 2025 *)

Formula

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

A096558 Output of the linear congruential pseudo-random number generator rand() used in Microsoft's Visual C++.

Original entry on oeis.org

0, 38, 7719, 21238, 2437, 8855, 11797, 8365, 32285, 10450, 30612, 5853, 28100, 1142, 281, 20537, 15921, 8945, 26285, 2997, 14680, 20976, 31891, 21655, 25906, 18457, 1323, 28881, 2240, 9725, 32278, 2446, 590, 840, 18587, 16907, 21237, 23611, 12617
Offset: 1

Views

Author

Hugo Pfoertner, Jul 21 2004

Keywords

Crossrefs

Cf. A096557 corresponding internal states. A096550-A096561 other pseudo-random number generators.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, 0,
          irem(214013 *b(n-1) +2531011, 4294967296))
        end:
    a:= n-> irem(iquo(b(n), 65536), 32768):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jun 10 2014
  • Mathematica
    A096557 = NestList[Mod[#*214013 + 2531011, 2^32] &, 0, 50];
    Mod[BitShiftRight[A096557, 16], 2^15] (* Paolo Xausa, Aug 29 2024 *)
  • PARI
    a(n)=A096557(n)>>16%2^15 \\ M. F. Hasler, May 14 2015
    
  • PARI
    A096558(n)=lift((Mod(214013, 2^34)^(n-1)-1)*13129821757)>>18%32768 \\ M. F. Hasler, May 14 2015

Formula

b(1)=0, b(n)=(b(n-1) * 214013 + 2531011) mod 2^32. a(n) = (floor(b(n)/65536) mod 32768). The sequence is periodic with period length 2^32.
a(n) = floor(A096557(n)/2^16) mod 2^15 = floor((2531011*(214013^(n-1)-1)/214012 mod 2^32)/2^16) mod 2^15. - M. F. Hasler, May 14 2015

A384696 Consecutive states of the linear congruential pseudo-random number generator Cray RANF when started at 1.

Original entry on oeis.org

1, 44485709377909, 232253848878969, 94800993741645, 243522309605169, 20783065360997, 154093299791145, 161954398135485, 183663036741473, 207319719370837, 142356556532697, 278312552510253, 242082341486737, 37630394630981, 176334633251721, 233894773868189
Offset: 1

Views

Author

Sean A. Irvine, Jun 07 2025

Keywords

Comments

Periodic with period 2^46.
Also implemented in the GNU Scientific Library as gsl_rng_ranf.
Also implemented in PASCLIB for Pascal programs on the CDC Cyber computers.

Crossrefs

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

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(44485709377909*a(n-1), 2^48))
        end:
    seq(a(n), n=1..16);  # Alois P. Heinz, Jun 09 2025
  • Mathematica
    NestList[Mod[44485709377909*#, 2^48] &, 1, 30] (* Paolo Xausa, Jun 11 2025 *)

Formula

a(n) = 44485709377909 * a(n-1) mod 2^48.

A383809 Consecutive states of a linear congruential pseudo-random number generator for Lisp 1985 when started at 1.

Original entry on oeis.org

1, 17, 38, 144, 189, 201, 154, 108, 79, 88, 241, 81, 122, 66, 118, 249, 217, 175, 214, 124, 100, 194, 35, 93, 75, 20, 89, 7, 119, 15, 4, 68, 152, 74, 3, 51, 114, 181, 65, 101, 211, 73, 237, 13, 221, 243, 115, 198, 103, 245, 149, 23, 140, 121, 49, 80, 105, 28
Offset: 1

Views

Author

Sean A. Irvine, May 17 2025

Keywords

Comments

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

Crossrefs

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

Programs

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

Formula

a(n) = 17 * a(n-1) mod 251.

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.

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

Original entry on oeis.org

1, 131069, 17179082761, 17183408101, 34345582673, 53083917, 16988766937, 17848727413, 32066509217, 7739650845, 25740764841, 33596591109, 30610037745, 12186659885, 12166953849, 6296898965, 7334844225, 19577928253, 5497393481, 14152584229, 20226775953
Offset: 1

Views

Author

Sean A. Irvine, May 20 2025

Keywords

Comments

Periodic with period 2^33 (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[131069*#, 2^35] &, 1, 20] (* Stefano Spezia, May 24 2025 *)

Formula

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

A096551 Consecutive internal states of a linear congruential pseudo-random number generator with a parameter proposed by George Marsaglia as a "candidate for the best of all multipliers".

Original entry on oeis.org

1, 69069, 475559465, 2801775573, 1790562961, 3104832285, 4238970681, 2135332261, 381957665, 1744831853, 1303896393, 1945705589, 2707602097, 4198202557, 3820321881, 201201733, 2583294017, 4003049741, 2417848425, 1454463253, 3332335313, 2360275549, 2093206905, 2813570789
Offset: 1

Views

Author

Hugo Pfoertner, Jul 18 2004

Keywords

Comments

The period length of 2^30 is only achieved if the starting value a(1) is odd. Even starting values lead to shorter periods, i.e., a starting value that is a multiple of 2^k leads to a sequence with period length 2^(30-k). - Hugo Pfoertner, Nov 21 2024

References

  • D. E. Knuth, The Art of Computer Programming Third Edition. Vol. 2 Seminumerical Algorithms. Chapter 3.3.4 The Spectral Test, Page 108. Addison-Wesley 1997.
  • G. Marsaglia, The structure of linear congruential sequences, in Applications of Number Theory to Numerical Analysis, (edited by S. K. Zaremba), Academic Press, New York, 249-286, 1972.

Crossrefs

Cf. A096550-A096561 (for other pseudo-random number generators).
Cf. A385127 (same multiplier).

Programs

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

Formula

a(1)=1, a(n) = 69069 * a(n-1) mod 2^32. The sequence is periodic with period length 2^30. - corrected by Hugo Pfoertner, Aug 10 2011
a(n) == 1 (mod 4). Hugo Pfoertner, Nov 21 2024
Previous Showing 11-20 of 76 results. Next