RandomInteger

RandomInteger[{minmax}]
yields a pseudorandom integer in the range from min to max.
RandomInteger[max]
yields a pseudorandom integer in the range from 0 to max.
RandomInteger[]
gives 0 or 1.
RandomInteger[rangen]
gives a list of n pseudorandom integers.
RandomInteger[range, {n1n2, ...}]
gives a nested list of pseudorandom integers.

Calling RandomInteger changes $RandomState: