Problem 60782. Convert integers from primary notation to base 10
The primary system of expressing numbers has three digits: m, x, and p, which correspond to -1, 0, and 1. The places in a primary number correspond to the prime numbers. For example, the number 6 could be ppm in primary notation because
. Similarly, the number 20 could be ppxxp in primary notation.
Because integers can be expressed as sums (and differences) of primes in several ways, several primary notations for a number can exist. Cody Problem 60783 deals with proper primary notation.
Write a function to convert integers expressed in primary notation to base 10.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers7
Suggested Problems
More from this Author291
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!