# History Question on Continued Fractions

I worked out the periodicity of some infinite continued fractions last night by hand. (Don't ask me why)

For example, $\sqrt{13}= [3,1,1,1,1,6,1,1,1,1,6,\ldots]$. Last night I worked out the first period of this continued fraction and the algebra was a little meh. I was wondering, what is the largest continued fraction period ever worked out by hand before?

For example: $\sqrt{D}$ may have the continued fraction expansion: $[\text{repeat}(a_1,a_2,a_3,\ldots, a_n)]$. Define the "first period worked out by hand" to be:

The discovery of the first $a_1,a_2,a_3,\ldots,a_n$ of the infinite continued fraction $\sqrt{D}$ using nothing but pencil, and paper.

Any stories for me?

• No story, but there are efficient ways to compute the continued fraction of square roots. Jul 19, 2013 at 23:08
• How is that related to math history?
– lhf
Jul 20, 2013 at 1:35

Lagrange's method uses just integer arithmetic and is suitable for use by hand. See How to detect when continued fractions period terminates

If you need more detail let me know.

Note that I used precisely that in Minimum of $n$? $123456789x^2 - 987654321y^2 =n$ ($x$,$y$ and $n$ are positive integers) although it was by computer.

Not by the way, if you are primarily interested in the square root of positive a integer $D,$ then the triple indicating a first form in the cycle is given by finding $$a_0 = \lfloor \sqrt D \rfloor$$ and then forming the triple $$\langle 1, 2 a_0, a_0^2 - D \rangle$$

Here, the triple $\langle a, b, c \rangle$ refers to the quadratic form $$f(x,y) = a x^2 + b x y + c y^2.$$ The form is "reduced" if both $ac <0$ and $b > |a+c|.$

jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$./Pell Input n for Pell 991 0 form 1 62 -30 delta -2 1 form -30 58 5 delta 12 2 form 5 62 -6 delta -10 3 form -6 58 25 delta 2 4 form 25 42 -22 delta -2 5 form -22 46 21 delta 2 6 form 21 38 -30 delta -1 7 form -30 22 29 delta 1 8 form 29 36 -23 delta -2 9 form -23 56 9 delta 6 10 form 9 52 -35 delta -1 11 form -35 18 26 delta 1 12 form 26 34 -27 delta -1 13 form -27 20 33 delta 1 14 form 33 46 -14 delta -3 15 form -14 38 45 delta 1 16 form 45 52 -7 delta -8 17 form -7 60 13 delta 4 18 form 13 44 -39 delta -1 19 form -39 34 18 delta 2 20 form 18 38 -35 delta -1 21 form -35 32 21 delta 2 22 form 21 52 -15 delta -3 23 form -15 38 42 delta 1 24 form 42 46 -11 delta -4 25 form -11 42 50 delta 1 26 form 50 58 -3 delta -20 27 form -3 62 10 delta 6 28 form 10 58 -15 delta -4 29 form -15 62 2 delta 31 30 form 2 62 -15 delta -4 31 form -15 58 10 delta 6 32 form 10 62 -3 delta -20 33 form -3 58 50 delta 1 34 form 50 42 -11 delta -4 35 form -11 46 42 delta 1 36 form 42 38 -15 delta -3 37 form -15 52 21 delta 2 38 form 21 32 -35 delta -1 39 form -35 38 18 delta 2 40 form 18 34 -39 delta -1 41 form -39 44 13 delta 4 42 form 13 60 -7 delta -8 43 form -7 52 45 delta 1 44 form 45 38 -14 delta -3 45 form -14 46 33 delta 1 46 form 33 20 -27 delta -1 47 form -27 34 26 delta 1 48 form 26 18 -35 delta -1 49 form -35 52 9 delta 6 50 form 9 56 -23 delta -2 51 form -23 36 29 delta 1 52 form 29 22 -30 delta -1 53 form -30 38 21 delta 2 54 form 21 46 -22 delta -2 55 form -22 42 25 delta 2 56 form 25 58 -6 delta -10 57 form -6 62 5 delta 12 58 form 5 58 -30 delta -2 59 form -30 62 1 delta 62 60 form 1 62 -30 disc 3964 Automorph, written on right of Gram matrix: 5788591406539787767296194303 361672073709940783423276163010 12055735790331359447442538767 753244210407084073508733597857 Pell automorph 379516400906811930638014896080 11947234168218377212415555918097 12055735790331359447442538767 379516400906811930638014896080 Pell unit 379516400906811930638014896080^2 - 991 * 12055735790331359447442538767^2 = 1 ========================================= 991 991 jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ date
Fri Jul 19 16:34:12 PDT 2013
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus\$