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.

A221556 Consecutive values produced by the C++ minstd_rand random number generator with the default seed (1).

This page as a plain text file.
%I A221556 #22 May 30 2025 18:19:47
%S A221556 48271,182605794,1291394886,1914720637,2078669041,407355683,
%T A221556 1105902161,854716505,564586691,1596680831,192302371,1203428207,
%U A221556 1250328747,1738531149,1271135913,1098894339,1882556969,2136927794,1559527823,2075782095,638022372,914937185,1931656580
%N A221556 Consecutive values produced by the C++ minstd_rand random number generator with the default seed (1).
%C A221556 This is a linear congruential random number generator with multiplier 48271.
%C A221556 Periodic with period 2^31-2. - _Sean A. Irvine_, May 30 2025
%H A221556 Alois P. Heinz, <a href="/A221556/b221556.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Eric M. Schmidt)
%H A221556 David G. Carta, <a href="https://doi.org/10.1145/76372.76379">Two Fast Implementations of the "Minimal Standard" Random Number Generator</a>, Commun. ACM, 33, 1 (1990), 87-88.
%H A221556 Stephen K. Park and Keith W. Miller, <a href="http://www.cems.uwe.ac.uk/~irjohnso/coursenotes/ufeen8-15-m/p1192-parkmiller.pdf">Random Number Generators: Good Ones are Hard to Find</a>, Communications of the ACM, Volume 31, Number 10 (October, 1988), pp. 1192-1201.
%H A221556 <a href="/index/Ps#PRN">Index entries for sequences related to pseudo-random numbers.</a>
%F A221556 a(n) = 48271^n mod (2^31-1).
%p A221556 a:= proc(n) option remember; `if`(n=0, 1,
%p A221556       irem(48271 *a(n-1), 2147483647))
%p A221556     end:
%p A221556 seq(a(n), n=1..30);  # _Alois P. Heinz_, Oct 25 2017
%t A221556 f[n_] := PowerMod[48271, n, 2^31 -1]; Array[f, 23] (* _Robert G. Wilson v_, Nov 10 2014 *)
%o A221556 (C++)
%o A221556 #include <iostream>
%o A221556 #include <random>
%o A221556 void A221556(int max)
%o A221556 {
%o A221556   std::minstd_rand gen;
%o A221556   for (int i = 1; i <= max; ++i)
%o A221556     std::cout << i << ' ' << gen() << '\n';
%o A221556 }
%Y A221556 Cf. A096550, A384405.
%K A221556 nonn,easy
%O A221556 1,1
%A A221556 _Eric M. Schmidt_, Jan 19 2013