Write the condition to be satisfied by q so that a rational number has a non-terminating terminating decimal expansion.

Let x = p/q be a rational number, such that the prime factorization of q is not of the form 2n 5m, where n, m are non-negative integers. Then x has a decimal expansion which is non-terminating repeating (recurring).


9