<s>
In	O
mathematics	O
and	O
computer	O
science	O
,	O
the	O
middle-square	B-Algorithm
method	I-Algorithm
is	O
a	O
method	O
of	O
generating	O
pseudorandom	B-Error_Name
numbers	I-Error_Name
.	O
</s>
<s>
In	O
practice	O
it	O
is	O
a	O
highly	O
flawed	O
method	O
for	O
many	O
practical	O
purposes	O
,	O
since	O
its	O
period	O
is	O
usually	O
very	O
short	O
and	O
it	O
has	O
some	O
severe	O
weaknesses	O
;	O
repeated	O
enough	O
times	O
,	O
the	O
middle-square	B-Algorithm
method	I-Algorithm
will	O
either	O
begin	O
repeatedly	O
generating	O
the	O
same	O
number	O
or	O
cycle	O
to	O
a	O
previous	O
number	O
in	O
the	O
sequence	O
and	O
loop	O
indefinitely	O
.	O
</s>
<s>
What	O
he	O
meant	O
,	O
he	O
elaborated	O
,	O
was	O
that	O
there	O
were	O
no	O
true	O
"	O
random	O
numbers	O
"	O
,	O
just	O
means	O
to	O
produce	O
them	O
,	O
and	O
"	O
a	O
strict	O
arithmetic	O
procedure	O
"	O
,	O
like	O
the	O
middle-square	B-Algorithm
method	I-Algorithm
,	O
"	O
is	O
not	O
such	O
a	O
method	O
"	O
.	O
</s>
<s>
Nevertheless	O
,	O
he	O
found	O
these	O
methods	O
hundreds	O
of	O
times	O
faster	O
than	O
reading	O
"	O
truly	O
"	O
random	O
numbers	O
off	O
punch	B-Architecture
cards	I-Architecture
,	O
which	O
had	O
practical	O
importance	O
for	O
his	O
ENIAC	B-Device
work	O
.	O
</s>
<s>
Modifying	O
the	O
middle-square	B-Algorithm
algorithm	I-Algorithm
with	O
a	O
Weyl	O
sequence	O
improves	O
period	O
and	O
randomness	O
.	O
</s>
<s>
To	O
generate	O
a	O
sequence	O
of	O
n-digit	O
pseudorandom	B-Error_Name
numbers	I-Error_Name
,	O
an	O
n-digit	O
starting	O
value	O
is	O
created	O
and	O
squared	O
,	O
producing	O
a	O
2n-digit	O
number	O
.	O
</s>
