Is there any way to calculate the n-th power of a (upper unitriangular) matrix in Sage? Here n is an integer variable.
|   | 1 |  initial version  | 
Is there any way to calculate the n-th power of a (upper unitriangular) matrix in Sage? Here n is an integer variable.
Is there any way to calculate the n-th power of a (upper unitriangular) matrix in Sage? Here n is an integer variable.
For example, if y=matrix([[1,0,0],[0,1,1],[0,0,1]]), then I want to obtain a formula in n for y^n. In this case this would be y^n=matrix([[1,0,0],[0,1,n],[0,0,1]]).
I tried the following: sage: y=matrix([[1,0,0],[0,1,1],[0,0,1]]); var('n'); sage: y^n
This resulted in the error: "NotImplementedError: non-integral exponents not supported"
Adding sage: assume(n, 'integer') has no effect at all.
|   | 3 |  retagged  | 
Is there any way to calculate the n-th power of a (upper unitriangular) matrix in Sage? Here n is an integer variable.
For example, if y=matrix([[1,0,0],[0,1,1],[0,0,1]]), then I want to obtain a formula in n for y^n. In this case this would be y^n=matrix([[1,0,0],[0,1,n],[0,0,1]]).
I tried the following: sage: y=matrix([[1,0,0],[0,1,1],[0,0,1]]); var('n'); sage: y^n
This resulted in the error: "NotImplementedError: non-integral exponents not supported"
Adding sage: assume(n, 'integer') has no effect at all.
|   | 4 |  retagged  | 
Is there any way to calculate the n-th power of a (upper unitriangular) matrix in Sage? Here n is an integer variable.
For example, if y=matrix([[1,0,0],[0,1,1],[0,0,1]]), then I want to obtain a formula in n for y^n. In this case this would be y^n=matrix([[1,0,0],[0,1,n],[0,0,1]]).
I tried the following: sage: y=matrix([[1,0,0],[0,1,1],[0,0,1]]); var('n'); sage: y^n
This resulted in the error: "NotImplementedError: non-integral exponents not supported"
Adding sage: assume(n, 'integer') has no effect at all.
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.