show/hide this revision's text 3 added 47 characters in body

EDIT: I got your fact right here.

ORIGINAL: It seems Henry got it. Meanwhile, let me point out how things appear from the Lagrange viewpoint of right-adjacent reduced forms: given odd numbers $n$ and $1 \leq m \leq n,$ the cycle for the form $\langle -1, n, m \rangle $ has penultimate form $\langle m, n, -1 \rangle, $ then "digit" $\delta = -n,$ then the end of the cycle is again $\langle -1, n, m \rangle .$ Well, see the method in my answer at http://mathoverflow.net/questions/22811/upper-bound-of-period-length-of-continued-fraction-representation-of-very-composi where the fact you need, the final $\delta = -n,$ follows from the definition of the $\delta$'s.

Examples:

=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 1

  0  form             -1           5           1


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 1   delta  5
1  form   1 5 -1   delta  -5
2  form   -1 5 1
minimum was   1rep 1 0 disc   29 dSqrt 5.3851648071  M_Ratio  29
Automorph, written on right of Gram matrix:  
-1  5
5  -26
 Trace:  -27   gcd(a21, a22 - a11, a12) : 5
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 3

  0  form             -1           5           3


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 3   delta  1
1  form   3 1 -3   delta  -1
2  form   -3 5 1   delta  5
3  form   1 5 -3   delta  -1
4  form   -3 1 3   delta  1
5  form   3 5 -1   delta  -5
6  form   -1 5 3
minimum was   1rep 1 0 disc   37 dSqrt 6.0827625303  M_Ratio  37
Automorph, written on right of Gram matrix:  
-13  72
24  -133
 Trace:  -146   gcd(a21, a22 - a11, a12) : 24
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 5

  0  form             -1           5           5


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 5   delta  1
1  form   5 5 -1   delta  -5
2  form   -1 5 5
minimum was   1rep 1 0 disc   45 dSqrt 6.7082039325  M_Ratio  45
Automorph, written on right of Gram matrix:  
-1  5
1  -6
 Trace:  -7   gcd(a21, a22 - a11, a12) : 1
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 1

  0  form             -1           7           1


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 1   delta  7
1  form   1 7 -1   delta  -7
2  form   -1 7 1
minimum was   1rep 1 0 disc   53 dSqrt 7.2801098893  M_Ratio  53
Automorph, written on right of Gram matrix:  
-1  7
7  -50
 Trace:  -51   gcd(a21, a22 - a11, a12) : 7
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 3

  0  form             -1           7           3


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 3   delta  2
1  form   3 5 -3   delta  -2
2  form   -3 7 1   delta  7
3  form   1 7 -3   delta  -2
4  form   -3 5 3   delta  2
5  form   3 7 -1   delta  -7
6  form   -1 7 3
minimum was   1rep 1 0 disc   61 dSqrt 7.8102496759  M_Ratio  61
Automorph, written on right of Gram matrix:  
-79  585
195  -1444
 Trace:  -1523   gcd(a21, a22 - a11, a12) : 195
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 5

  0  form             -1           7           5


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 5   delta  1
1  form   5 3 -3   delta  -1
2  form   -3 3 5   delta  1
3  form   5 7 -1   delta  -7
4  form   -1 7 5
minimum was   1rep 1 0 disc   69 dSqrt 8.3066238629  M_Ratio  69
Automorph, written on right of Gram matrix:  
2  -15
-3  23
 Trace:  25   gcd(a21, a22 - a11, a12) : 3
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 7

  0  form             -1           7           7


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 7   delta  1
1  form   7 7 -1   delta  -7
2  form   -1 7 7
minimum was   1rep 1 0 disc   77 dSqrt 8.7749643874  M_Ratio  77
Automorph, written on right of Gram matrix:  
-1  7
1  -8
 Trace:  -9   gcd(a21, a22 - a11, a12) : 1
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ 
show/hide this revision's text 2 added 256 characters in body

It seems Henry got it. Meanwhile, let me point out how things appear from the Lagrange viewpoint of right-adjacent reduced forms: given odd numbers $n$ and $1 \leq m \leq n,$ the cycle for the form $\langle -1, n, m \rangle $ has penultimate form $\langle m, n, -1 \rangle, $ then "digit" $\delta = -n,$ then the end of the cycle is again $\langle -1, n, m \rangle .$ Well, see the method in my answer at http://mathoverflow.net/questions/22811/upper-bound-of-period-length-of-continued-fraction-representation-of-very-composi where the fact you need, the final $\delta = -n,$ follows from the definition of the $\delta$'s.

Examples:

=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 1

  0  form             -1           5           1


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 1   delta  5
1  form   1 5 -1   delta  -5
2  form   -1 5 1
minimum was   1rep 1 0 disc   29 dSqrt 5.3851648071  M_Ratio  29
Automorph, written on right of Gram matrix:  
-1  5
5  -26
 Trace:  -27   gcd(a21, a22 - a11, a12) : 5
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 3

  0  form             -1           5           3


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 3   delta  1
1  form   3 1 -3   delta  -1
2  form   -3 5 1   delta  5
3  form   1 5 -3   delta  -1
4  form   -3 1 3   delta  1
5  form   3 5 -1   delta  -5
6  form   -1 5 3
minimum was   1rep 1 0 disc   37 dSqrt 6.0827625303  M_Ratio  37
Automorph, written on right of Gram matrix:  
-13  72
24  -133
 Trace:  -146   gcd(a21, a22 - a11, a12) : 24
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 5

  0  form             -1           5           5


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 5   delta  1
1  form   5 5 -1   delta  -5
2  form   -1 5 5
minimum was   1rep 1 0 disc   45 dSqrt 6.7082039325  M_Ratio  45
Automorph, written on right of Gram matrix:  
-1  5
1  -6
 Trace:  -7   gcd(a21, a22 - a11, a12) : 1
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 1

  0  form             -1           7           1


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 1   delta  7
1  form   1 7 -1   delta  -7
2  form   -1 7 1
minimum was   1rep 1 0 disc   53 dSqrt 7.2801098893  M_Ratio  53
Automorph, written on right of Gram matrix:  
-1  7
7  -50
 Trace:  -51   gcd(a21, a22 - a11, a12) : 7
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 3

  0  form             -1           7           3


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 3   delta  2
1  form   3 5 -3   delta  -2
2  form   -3 7 1   delta  7
3  form   1 7 -3   delta  -2
4  form   -3 5 3   delta  2
5  form   3 7 -1   delta  -7
6  form   -1 7 3
minimum was   1rep 1 0 disc   61 dSqrt 7.8102496759  M_Ratio  61
Automorph, written on right of Gram matrix:  
-79  585
195  -1444
 Trace:  -1523   gcd(a21, a22 - a11, a12) : 195
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 5

  0  form             -1           7           5


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 5   delta  1
1  form   5 3 -3   delta  -1
2  form   -3 3 5   delta  1
3  form   5 7 -1   delta  -7
4  form   -1 7 5
minimum was   1rep 1 0 disc   69 dSqrt 8.3066238629  M_Ratio  69
Automorph, written on right of Gram matrix:  
2  -15
-3  23
 Trace:  25   gcd(a21, a22 - a11, a12) : 3
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 7

  0  form             -1           7           7


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 7   delta  1
1  form   7 7 -1   delta  -7
2  form   -1 7 7
minimum was   1rep 1 0 disc   77 dSqrt 8.7749643874  M_Ratio  77
Automorph, written on right of Gram matrix:  
-1  7
1  -8
 Trace:  -9   gcd(a21, a22 - a11, a12) : 1
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ 
show/hide this revision's text 1

It seems Henry got it. Meanwhile, let me point out how things appear from the Lagrange viewpoint of right-adjacent reduced forms: given odd numbers $n$ and $1 \leq m \leq n,$ the cycle for the form $\langle -1, n, m \rangle $ has penultimate form $\langle m, n, -1 \rangle, $ then "digit" $\delta = -n,$ then the end of the cycle is again $\langle -1, n, m \rangle .$

Examples:

=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 1

  0  form             -1           5           1


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 1   delta  5
1  form   1 5 -1   delta  -5
2  form   -1 5 1
minimum was   1rep 1 0 disc   29 dSqrt 5.3851648071  M_Ratio  29
Automorph, written on right of Gram matrix:  
-1  5
5  -26
 Trace:  -27   gcd(a21, a22 - a11, a12) : 5
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 3

  0  form             -1           5           3


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 3   delta  1
1  form   3 1 -3   delta  -1
2  form   -3 5 1   delta  5
3  form   1 5 -3   delta  -1
4  form   -3 1 3   delta  1
5  form   3 5 -1   delta  -5
6  form   -1 5 3
minimum was   1rep 1 0 disc   37 dSqrt 6.0827625303  M_Ratio  37
Automorph, written on right of Gram matrix:  
-13  72
24  -133
 Trace:  -146   gcd(a21, a22 - a11, a12) : 24
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 5 5

  0  form             -1           5           5


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 5 5   delta  1
1  form   5 5 -1   delta  -5
2  form   -1 5 5
minimum was   1rep 1 0 disc   45 dSqrt 6.7082039325  M_Ratio  45
Automorph, written on right of Gram matrix:  
-1  5
1  -6
 Trace:  -7   gcd(a21, a22 - a11, a12) : 1
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 1

  0  form             -1           7           1


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 1   delta  7
1  form   1 7 -1   delta  -7
2  form   -1 7 1
minimum was   1rep 1 0 disc   53 dSqrt 7.2801098893  M_Ratio  53
Automorph, written on right of Gram matrix:  
-1  7
7  -50
 Trace:  -51   gcd(a21, a22 - a11, a12) : 7
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 3

  0  form             -1           7           3


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 3   delta  2
1  form   3 5 -3   delta  -2
2  form   -3 7 1   delta  7
3  form   1 7 -3   delta  -2
4  form   -3 5 3   delta  2
5  form   3 7 -1   delta  -7
6  form   -1 7 3
minimum was   1rep 1 0 disc   61 dSqrt 7.8102496759  M_Ratio  61
Automorph, written on right of Gram matrix:  
-79  585
195  -1444
 Trace:  -1523   gcd(a21, a22 - a11, a12) : 195
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 5

  0  form             -1           7           5


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 5   delta  1
1  form   5 3 -3   delta  -1
2  form   -3 3 5   delta  1
3  form   5 7 -1   delta  -7
4  form   -1 7 5
minimum was   1rep 1 0 disc   69 dSqrt 8.3066238629  M_Ratio  69
Automorph, written on right of Gram matrix:  
2  -15
-3  23
 Trace:  25   gcd(a21, a22 - a11, a12) : 3
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle
Input three coefficients a b c for indef f(x,y)= a x^2 + b x y + c y^2 
-1 7 7

  0  form             -1           7           7


           1           0
           0           1

To Return  
           1           0
           0           1

0  form   -1 7 7   delta  1
1  form   7 7 -1   delta  -7
2  form   -1 7 7
minimum was   1rep 1 0 disc   77 dSqrt 8.7749643874  M_Ratio  77
Automorph, written on right of Gram matrix:  
-1  7
1  -8
 Trace:  -9   gcd(a21, a22 - a11, a12) : 1
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$