"JP" == James Propp <jamespropp@gmail.com> writes:
JP> More specifically, 1/(10^n-1) repeats with period n, but its square JP> repeats with period 10^n-1 or thereabouts. If one looks at it as base b=10^n, where any integer divided by b-1 repeats in base b with a cycle 1 base b "digit" long, then since the square of b-1 is b²-2b+1, one needs to find the smallest b' such that b' is 10^m, m>n and b'-1 is an integer multiple of b²-2b+1. (Or, put another way, b²-2b+1 is a factor of b'-1.) The length of the decimal cycle is then m. That gives k·(10ⁿ-1)²/(10ⁿ) = 10^l, where k,l are in Z+, and n+l as a funtion of n is the question. It has been long engough, that I forget how to attack that style of equation. -JimC -- James Cloos <cloos@jhcloos.com> OpenPGP: 0x997A9F17ED7DAEA6