Ask Your Question
0

How do I extract base(3) and index (15) from $3^{15}$ in SageMath?

asked 2020-04-16 09:24:00 -0600

How do I extract base(3) and index (15) from $3^{15$} in SageMath?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2020-04-16 10:20:38 -0600

You can use the is_prime_power method:

sage: a = 3**15
sage: a.is_prime_power()
True
sage: a.is_prime_power(get_data=True)
(3, 15)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-04-16 09:24:00 -0600

Seen: 35 times

Last updated: Apr 16