Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A096554
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A096554 Output of the linear congruential pseudo-random number generator used in function rand() as described in Kernighan and Ritchie. +0
2
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 (list; graph; listen)
OFFSET

1,2

COMMENT

The corresponding sequence of consecutive internal states of this generator is A096553.

REFERENCES

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

FORMULA

x(1)=1, x(n)=(1103515245 * x(n-1) + 12345) mod 2^31 a(n)=floor(x(n)/2^16)

PROGRAM

C Program: static unsigned int next = 1; int rand( ) { next = next * 1103515245 + 12345; return ((next >>16) & 32767); }

CROSSREFS

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

Sequence in context: A109029 A083361 A086477 this_sequence A063388 A113620 A074812

Adjacent sequences: A096551 A096552 A096553 this_sequence A096555 A096556 A096557

KEYWORD

nonn

AUTHOR

Hugo Pfoertner (hugo(AT)pfoertner.org), Jul 18 2004

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 29 12:46 EST 2009. Contains 167659 sequences.


AT&T Labs Research