Ask Your Question
0

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

asked 2020-04-16 16:24:00 +0200

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 17:20:38 +0200

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 16:24:00 +0200

Seen: 222 times

Last updated: Apr 16 '20