1 | initial version |
What version of Sage are you using?
It works for me in Sage 8.2.beta4.
sage: version()
'SageMath version 8.2.beta4, Release Date: 2018-01-27'
sage: n = 4
sage: k = n*(n-1)/2
sage: L = PolynomialRing(ZZ, k, "x")
sage: L
Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x5 over Integer Ring
What happens if you define k
as a integer instead of a rational, as follows?
k = n*(n-1)//2
or
sage: k = binomial(n, 2)