Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 3 years ago

Max Alekseyev gravatar image

Such expressions are given by continuants. Sage provides function continuant for computing them - see https://doc.sagemath.org/html/en/reference/rings_standard/sage/arith/misc.html

click to hide/show revision 2
No.2 Revision

Such expressions are given by continuants - namely, pn(a0,,an)=Kn+1(a0,,an) and qn(a0,,an)=Kn(a1,,an) . Sage provides function continuant for computing them - see https://doc.sagemath.org/html/en/reference/rings_standard/sage/arith/misc.html

click to hide/show revision 3
No.3 Revision

Such expressions are given by continuants - namely, pn(a0,,an)=Kn+1(a0,,an) and qn(a0,,an)=Kn(a1,,an) . Sage provides function continuant for computing them - see https://doc.sagemath.org/html/en/reference/rings_standard/sage/arith/misc.html

Here is an example for n=5:

R.<a> = InfinitePolynomialRing(QQ)
print('p=', continuant( [a[i] for i in (0..5)]) )
print('q=', continuant( [a[i] for i in (1..5)]) )