Does there exist a method in Sage's symbolic ring that would be able to (automatically) rewrite expressions such as $3^{\log n}$ into $n^{\log 3}$?

1 | initial version |

Does there exist a method in Sage's symbolic ring that would be able to (automatically) rewrite expressions such as $3^{\log n}$ into $n^{\log 3}$?

Does there exist a method in Sage's symbolic ring that would be able to (automatically) rewrite expressions such as
$3^{\log n}$ into $n^{\log ~~3}$? ~~3}$?

Here I assume that $n$ is a positive integer.

Remark: I am quite surprised (and therefore pessimistic for my question) by the following:

```
sage: [bool(3^(log(i)) == i^(log(3))) for i in range(1, 12)]
[True, True, True, True, False, False, True, False, True, False, False]
```

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.