Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A152960
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A152960 Output of linear congruential generator 134775813 for 32 bit values +0
1
0, 1, 134775814, -596792289, 870078620, 1172187917, -1410233534, 1368768587, 694906232, 1598751577, 1828254910, 352239543, 2039224980, 303092965, -683524998, 256513635, 1259699184, -355259471 (list; graph; listen)
OFFSET

1,3

COMMENT

A widely used pseudo-random number generator, for example all Delphi-Versions until now use it for their "Random" function.

It can be shown that the sequence has full period (its length is 2^32).

LINKS

Wikipedia, Linear congruential generator

FORMULA

X[n+1] = (134775813*X[n] + 1) mod (2^32)

PROGRAM

(Other) //Delphi implementation using it's random() function

var

I: Integer;

begin

Randseed:= 0;

for I:= 1 to 100 do begin

Write(Randseed, ', ');

Random;

end;

end.

CROSSREFS

Sequence in context: A017493 A017625 A122968 this_sequence A034590 A105297 A034642

Adjacent sequences: A152957 A152958 A152959 this_sequence A152961 A152962 A152963

KEYWORD

sign

AUTHOR

Moritz Franckenstein (maf-soft(AT)gmx.net), Dec 16 2008

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 December 2 11:54 EST 2009. Contains 167921 sequences.


AT&T Labs Research