This page was motivated from work done by teachers at the Focus on Mathematics Summer Institute on Algebra during the week of August 9, 2004 and specifically by an observation by Paul Grady, from Waltham HS. I'm not going to describe the way this works since it will spoil the opportunity you have to figure it out on your own!
At issue is whether, given a positive integer k, there exists an integer n such that the decimal represention of has period k. For example, if , we can point to
Estimated maximum input is about 30-35. "Time-out" will result from larger inputs.