# NOT RUN {
# Default case (m, a = 31, 13); small full period
lehmer(plotDelay = 0, numSteps = 16)
# }
# NOT RUN {
lehmer(plotDelay = -1) # interactive mode
lehmer(numSteps = 10, plotDelay = 0.01) # auto-advance mode
# multiplier producing period of length 5, with different seeds
lehmer(a = 8, m = 31, seed = 1, numSteps = 5, plotDelay = 0.1)
lehmer(a = 8, m = 31, seed = 24, numSteps = 5, plotDelay = 0.1)
# degenerate cases where seed does not appear in the final period
lehmer(a = 12, m = 20, seed = 7, numSteps = 4, plotDelay = 0.1) # length 4
lehmer(a = 4, m = 6, seed = 1, numSteps = 1, plotDelay = 0.1) # length 1
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab