We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
You could just change the constants in this simple algorithm. A solution is guaranteed (for large enough numbers of digits) whenever the two constants are coprime (no common prime factors). If the problem merited it (larger constants), you could use the Extended Euclidean Algorithm to calculate, but that would require some understanding of modular arithmetic.
Sherlock and The Beast
You are viewing a single comment's thread. Return to all comments →
You could just change the constants in this simple algorithm. A solution is guaranteed (for large enough numbers of digits) whenever the two constants are coprime (no common prime factors). If the problem merited it (larger constants), you could use the Extended Euclidean Algorithm to calculate, but that would require some understanding of modular arithmetic.