I have formulated this question based on the initial curiosity and further investigation of the topic posted here: Identity and possible generalization of the reflective periodic continued fractions

How do you proof that for the square root of any positive prime, the simply periodic continuous fraction is palindromic?

It should be true both for even:

$$\sqrt{Z^+_{prime}} = [a_0; a_1, a_2, ..., a_2, a_1, 2a_0]$$

and for odd:

$$\sqrt{Z^+_{prime}} = [a_0; a_1, ..., a_n, ..., a_1, 2a_0]$$


See also: https://en.wikipedia.org/wiki/Square_root#As_periodic_continued_fractions

  • $\begingroup$ It's no easier to prove it for primes than to prove it for positive nonsquare integers generally, but it is a bit long. Better to get yourself a good intro Number Theory text, many of them include the proof. $\endgroup$ – Gerry Myerson May 20 '17 at 12:52
  • $\begingroup$ I found many papers talking about the symmetry of the conjugate of the quadratic surd. But I didn't find any of them dealing with palindromic part exactly. I'd appreciate any reference that deals with the exact palindromic case I'm pointing. Of cource handling primes is not required, I thought it could narrow the problem but maybe it doesn't but rather complicates the proof... $\endgroup$ – MarkokraM May 20 '17 at 13:01
  • $\begingroup$ Have you tracked down any of the references in my answer? $\endgroup$ – Gerry Myerson May 23 '17 at 12:42
  • 1
    $\begingroup$ Yes. I found Roberts and Stark and got some ideas. Still trying to find other three sources if they are available online. I'll be back after doing some work with given exercises. $\endgroup$ – MarkokraM May 23 '17 at 14:04
  • 1
    $\begingroup$ Also Rosen, "Elementary Number Theory" (10.4, pages 387-388) was online. So far it has the exact point made toward palindromic part and double ending of the sequence. It just needs to be modified a bit to fit to my question. $\endgroup$ – MarkokraM May 24 '17 at 3:56

Here are five textbooks that deal with the palindromic feature of the continued fraction expansion of $\sqrt n$. Some give detailed proofs, some give it as an exercise with strong hints. All require reading some of the material leading up to the problem. There's just no really easy way – you have to roll your sleeves up and get to work!

  1. Rosen, Elementary Number Theory, 4th edition, Section 12.4.

  2. Roberts, Elementary Number Theory, Chapter XIII, problem 17, part vi (book includes complete solutions to all problems).

  3. Shanks, Solved and Unsolved Problems in Number Theory, Exercise 138, page 186.

  4. Steuding, Diophantine Analysis, Section 5.4.

  5. Stark, An Introduction to Number Theory, Chapter 7, Miscellaneous Exercise 18.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.