It is said that the numerical generation of exact chaotic time series by iterating, for example, the logistic map, will be impossible, because chaos has a high dependency on initial values. In this letter, an algorithm to generate them without the accumulation of inevitable round-off errors caused by the iteration is proposed, where rational numbers are introduced. Also, it is shown that the period of the chaotic time series depends on the rational numbers including large prime numbers, which are fundamentally related to the Mersenne and the Fermat prime ones. Since the time series are numerically regenerated by the proposed algorithm in an usual computer environment, it could be applied to cryptosystems which do not need the synchronization, and have a large key-space by using large prime numbers.