|
|
A221556
|
|
Consecutive values produced by the C++ minstd_rand random number generator with the default seed (1).
|
|
3
|
|
|
48271, 182605794, 1291394886, 1914720637, 2078669041, 407355683, 1105902161, 854716505, 564586691, 1596680831, 192302371, 1203428207, 1250328747, 1738531149, 1271135913, 1098894339, 1882556969, 2136927794, 1559527823, 2075782095, 638022372, 914937185, 1931656580
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
This is a linear congruential random number generator with multiplier 48271.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 48271^n mod (2^31-1).
|
|
MAPLE
|
a:= proc(n) option remember; `if`(n=0, 1,
irem(48271 *a(n-1), 2147483647))
end:
|
|
MATHEMATICA
|
|
|
PROG
|
(C++)
#include <iostream>
#include <random>
{
std::minstd_rand gen;
for (int i = 1; i <= max; ++i)
std::cout << i << ' ' << gen() << '\n';
}
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|