[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Revision History for A221555 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
Consecutive values produced by the C++ knuth_b random number generator with the default seed (1).
(history; published version)
#9 by Charles R Greathouse IV at Thu Sep 10 01:12:05 EDT 2015
STATUS

editing

approved

#8 by Charles R Greathouse IV at Thu Sep 10 01:12:01 EDT 2015
LINKS

<a href="/index/Ps#PRN">Index entries for sequences related to pseudo-random numbers.</a>

STATUS

approved

editing

#7 by T. D. Noe at Mon Jan 21 14:42:05 EST 2013
STATUS

proposed

approved

#6 by Eric M. Schmidt at Sun Jan 20 19:22:15 EST 2013
STATUS

editing

proposed

Discussion
Mon Jan 21
14:42
T. D. Noe: Seems to me that a(0) should be the seed value.
#5 by Eric M. Schmidt at Sun Jan 20 16:04:28 EST 2013
NAME

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

#4 by Eric M. Schmidt at Sun Jan 20 00:06:05 EST 2013
PROG

#include <random>

#include <random> void A221555(int max)

#3 by Eric M. Schmidt at Sat Jan 19 22:50:49 EST 2013
NAME

allocated for Eric M. Schmidt

Consecutive values produced by the C++ knuth_b random number generator with the default seed.

DATA

152607844, 823378840, 578354438, 2035308228, 1004016855, 280090412, 101929267, 1784484492, 944975825, 1190959745, 2051724831, 784170963, 1102246882, 1400285365, 915896220, 1070477904, 515204530, 1083454666, 681910962, 269220094, 563613512, 194847408, 1998097157

OFFSET

1,1

COMMENTS

The knuth_b generator uses "Algorithm B" (described in the Knuth reference) to permute the values produced by the "minimal standard generator".

REFERENCES

Carter Bays and S. D. Durham, "Improving a Poor Random Number Generator", ACM Transactions on Mathematical Software, vol. 2, issue 1 (March 1976), pp. 59-64.

D. E. Knuth, The Art of Computer Programming, 2nd Edition, vol. 2 Seminumerical Algorithms, Addison-Wesley, 1981, pp. 32-33.

LINKS

Eric M. Schmidt, <a href="/A221555/b221555.txt">Table of n, a(n) for n = 1..1000</a>

PROG

(C++)

#include <iostream>

#include <random> void A221555(int max)

{

std::knuth_b gen;

for (int i = 1; i <= max; ++i)

std::cout << i << ' ' << gen() << '\n';

}

CROSSREFS

Cf. A096550.

KEYWORD

allocated

nonn

AUTHOR

Eric M. Schmidt, Jan 19 2013

STATUS

approved

editing

#2 by Eric M. Schmidt at Sat Jan 19 21:57:40 EST 2013
KEYWORD

allocating

allocated

#1 by Eric M. Schmidt at Sat Jan 19 21:57:40 EST 2013
NAME

allocated for Eric M. Schmidt

KEYWORD

allocating

STATUS

approved