The solutions are in! Last week’s POW-9 is a problem for which you need a bit of insight to solve at all (even with calculator or computer), and then a bit more to solve elegantly without machine aid.

*Solution by Philipp Lampe, University of Bonn*: The answer is . The decimal expansion of 1/65537 is eventually periodic with (minimum) period length . Suppose it takes the form

for integers and . Then , and therefore ; equivalently . The minimum such that (i.e., the *order* of 10 modulo 65537) must then divide . On the other hand, from , we derive

Thus by minimality of , we conclude , and that the decimal expansion is periodic (not merely eventually periodic).

It is well known that is prime (it is the largest known Fermat prime), so by Fermat’s little theorem, the order of 10 modulo divides (where is the Euler phi-function), and so it must be a power of 2, at most . That the order is in fact can be checked either by brute force (by repeated squaring and reduction modulo 65537, best carried out with calculator or computer), or by the following number-theoretic argument.

Since is prime, the multiplicative group of nonzero elements of the field is cyclic (is generated by a single element, say ). Hence where , and itself is a generator (has order 65536) iff is prime to 65536, i.e., iff is odd. This occurs iff 10 is a non-square modulo . Defining the Jacobi symbol by the usual formula

(so that iff is a square modulo ), we have

The second factor is, by the law of quadratic reciprocity (and the fact ),

Also, by the “second supplement“, we compute . Hence : 10 is a non-square as desired. This completes the proof.

**Remarks**:The argument in the first paragraph of Philipp’s solution proves for 1/65537 a fact which holds generally for any reduced fraction where is prime to 10: that the decimal expansion is actually periodic, not just eventually periodic. Henry Wilton also took the time and trouble to argue this point. I’m not sure how widely known that is, so I was glad the point was made; of course the main thing we need from that paragraph is the general fact that the period length of equals the order of 10 modulo .

A number of solvers computed the order of 10 by brute force, which I accepted. The use of quadratic reciprocity is slick but gets into rather deeper waters. As the Wikipedia article explains, this law was known to (or at least conjectured by) Euler and Legendre, but resisted a complete proof until Gauss found one after an intensive effort; it was one of his proudest achievements, and a theorem he returned to over the decades, giving over half a dozen more proofs in his life. Now more than 200 proofs are known. One proof that I like was given by Zolotarev, which is given a nice account in an appendix to John Conway’s very entertaining book, The (Sensual) Quadratic Form. Arin Chaudhuri pointed out to me that it’s also given as an exercise in Knuth’s The Art of Computer Programming (Vol. I, p. 45, exercise 47).

The “second supplement” was, according to the Wikipedia article, first proved by Euler. Its use here can be circumvented by observing that 2 cannot have order since already , so that by Lampe’s argument, 2 is a square mod , i.e. .

Quadratic reciprocity is no isolated curiosity: most of the deeper, more conceptual treatments involve some nontrivial algebraic number theory, and the efforts to formulate reciprocity laws for higher powers had a lot to do with the creation of class field theory, culminating in Artin reciprocity, one of the crowning achievements of early 20th century mathematics.

Also solved by Arin Chaudhuri, Ashwin Kumar, Vladimir Nesov, Américo Tavares, Nathan Williams, and Henry Wilton. Thanks to all who wrote in!

## 5 comments

Comments feed for this article

October 2, 2008 at 4:58 pm

My solution to the Problem Of the Week-9 [Todd and Vishal's blog]: Period of a decimal expansion « problemas | teoremas[…] much more sophisticated and elegant solution by Philipp Lampe was posted by one of the authors of this excellent and advanced mathematical […]

October 6, 2008 at 2:55 pm

Versão portuguesa da minha resolução do «Problem Of the Week-9 [Todd and Vishal's blog]»: Período de uma dízima « problemas | teoremas[…] dos autores deste excelente blogue de matemática de nível avançado publicou a resolução muito mais sofisticada e elegante apresentada por by Philipp […]

October 27, 2013 at 8:56 am

AdamHere one can check solutions using online calculator :

http://www.knowledgedoor.com/2/calculators/convert_a_ratio_of_integers.html

October 27, 2013 at 9:13 am

Adamit seems that decimal expansion is strictly periodic ( preperiod =0) not eventually periodic. 2^4*40961 = 65537 so its expansion is periodic because it’s prime factorisation has 2 and also other primes then 2 or 5 .

October 27, 2013 at 3:56 pm

Adamsorry, my mistake in second statement 65537 is a prime , 655376 = 2^4*40961.

First statment seems to be good