 The only times that the sequence of state numbers generated by the algorithm produces a power of 2 is when "k" is 1 (so that the exponent of 7 is 0), which only occurs if the exponent of 2 is a prime.A step-by-step explanation of Conway's algorithm can be found in Havil(2007).The following FRACTRAN program