Given natural numbers of special very composite form, like primorials or factorials, how to give some useful upper bound limit of continued fraction period length of their square roots?


I'm not a professional, any advices are welcome.



Upper bound of period length of continued fraction representation of very composite number square root
The continued fraction length is usually a small constant factor away from the regulator. A more precise version can also be achieved, but I don't remember a reference, so if anyone does...


Then, we know the regulator times the class number is usually a small constant factor away from the discriminant (of the order, not necessarily the field).


In addition, if a discriminant has $n$ prime factors in its squarefree part, the class number will be divisible by $2^{n-1}$.


Finally, most positive numbers of some size don't have many prime factors, and we suspect the real quadratic fields composed from these to have relatively small class number (look up Cohen-Lenstra).


Combining these facts and heuristics we get that primorials, and even factorials (still have large squarefree part), will have larger class number, hence small regulator, and therefore smaller continued fraction period length.


That said, we can dig even deeper. For factorials, there is a hefty squareful part. When we go from the maximal order of the field $\mathbb{Q}(\sqrt{n!})$ to the order $\mathbb{Z}(\sqrt{n!})$, the discriminant is enlarged hugely. Each prime (even) power $p^{2m}\ ||\ n!$ adds $p^{m-1}(p-(squarefree(n!)/p))$ to the original $h\_K\times R\_K$. So for each such factor, something goes into the class number of the smaller order, and something goes into the regulator of the smaller order.


Here comes the interesting bit. The factors that make up the new regulator tell us how far the unit group in the small order is from the unit group of the maximal order. Since we are in a real quadratic field the unit groups are of rank 1, so this distance is just the exponent to which the fundamental unit is powered by in order to enter the smaller order. Say $p\_1-1$ and $p\_2-1$ (say Legendre symbol is 1) have a large gcd. Once we power the fundamental unit to, say, $p\_1-1$ to get (locally) into the $p$-part of the smaller order, we can slack off when getting into the $p\_2$-part of the smaller order, because we've already done some of the work.


So in the factorial case, or in any number with many square factors (not dividing the squarefree part), since many of the above mentioned factors will have a large gcd, most of the factors will have to go into the class number of the small order - hence the very small regulator and continued fraction expansion.




---


We can write the above explicitly, but we need another notion. When a prime divides the discriminant to an even power greater than 2, the power of $p$ from the above mentioned factor that goes into the regulator measures how the fundamental unit is far p-adically from being 1. For most $p$, the fundamental unit will not be $1\ (mod\ p^2)$, so pretty much all of the $p^{m-1}$ goes into the regulator.


Hence, we expect:


$$ \frac{period-length(n!)}{\sqrt{n!}} \sim \frac{lcm(\{\ p-(p/squarefree(n!))\ |\ p^{2m}\ ||\ n!\ \}}{\prod\_{p^{2m}||n!} (p-(p/squarefree(n!))} $$


And how that factor behaves - I have no idea. Sounds like a combinatorical answer could exist.


