To play the "fraction game" corresponding to a given list *f _{1}, f_{2}, ..., f_{k}* of fractions and starting integer

*N*, you repeatedly multiply the integer you have at any stage (initially

*N*) by the earliest

*f*in the list for which the answer is integral. Whenever there is no such

_{i}*f*, the game stops.

_{i}Formally, we define a sequence by *S _{0}=N*, and

*S*, if for

_{j+1}=f_{i}S_{j}*1<=i<=k*, the number

*f*is an integer but the numbers

_{i}S_{j}*f*are not.

_{1}S_{j}, ..., f_{i-1}S_{j}For example, if we have the list of eight fractions *f _{1}=170/39*,

*f*,

_{2}=19/13*f*,

_{3}=13/17*f*,

_{4}=69/95*f*,

_{5}=19/23*f*,

_{6}=1/19*f*,

_{7}=13/7*f*, and start with

_{8}=1/3*N=21*, we produce the (finite) sequence

*(21,39,170,130,190,138,114,6,2)*. In general, the sequence may be infinite.

*2*that appear in the sequence.