Writing a polynomial as a product of t-numbers
I have a function which produces a polynomial in t with positive integer coefficients, and I know that these factor as product of t− numbers of the form [k]t=1+t+...+tk−1 . Is there a way to factor the polynomials in sage which readily give the factorization in terms of the t−numbers?
For example, I have a polynomial (t2−t+1)(t2+t+1)(t+1)2=(t5+t4+t3+t2+t+1)(t+1). I want the program to return [6]t[2]t.