The question (from Pacher Christoph): What rational fraction is equal to .000100040009001600250036...? can be answered easily using (ordinary) generating functions*. First look up the sequence 1,4,9,16,25,36 on OEIS: http://oeis.org/A000290 In the "FORMULA" section we find the (odinary) generating function: G.f.: x * (1 + x) / (1 - x)^3. Since we want each term to be 4 digits of the decimal expansion, let x equal 0.0001. x = 0.0001 x*(1+x) / (1-x)^3 = 0.00010001 / 0.999700029999 Then turn it into a reduced fraction of integers: 0.00010001 / 0.999700029999 = 100010000/999700029999 = (2^4*5^4*73*137)/(3^6*11^3*101^3) The prime factorization of 100010000 and 999700029999 shows that the fraction is in reduced form. Verifying the result, to 300 digits using the Unx tool bc: scale=300 100010000/999700029999 .0001000400090016002500360049006400810100012101440169019602250256028\ 90324036104000441048405290576062506760729078408410900096110241089115\ 61225129613691444152116001681176418491936202521162209230424012500260\ 12704280929163025313632493364348136003721384439694096422543564489462\ 44761490050415184532954765625 We get a two-digit version by letting x=0.01, which gives 10100/970299=0.0104091625364964... what I could not find there but it also quite well-known:
The decimal expansions of the multiples of 1/7 (and of inverses of so-called full reptend primes) are cyclic shifted versions of each other. There exists a simple card trick (which I found in a book of Martin Gardner) based on this fact.
Christoph
Integers whose reciprocal has N-1 digits are "the primes with primitive root 10", http://oeis.org/A001913 The card trick is here: http://www.ams.org/samplings/feature-column/fcarc-mulcahy2 (found with Google "142857 card trick") - Robert * Finding the ordinary generating function for an integer sequence is the inverse of the process of finding the a Taylor/Maclaurin series expansion for a function. It is a bit surprising that this is how you would answer this type of decimal fraction question, but there it is. -- Robert Munafo -- mrob.com Follow me at: gplus.to/mrob - fb.com/mrob27 - twitter.com/mrob_27 - mrob27.wordpress.com - youtube.com/user/mrob143 - rilybot.blogspot.com