All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Prime digit cryptography (Posted on 2025-02-19) Difficulty: 3 of 5
      * * *
        * *
  ---------
    * * * *
  * * * *
  ---------
  * * * * *
In this cryptarithm both the digits and operations have been removed. Each digit is a prime (2, 3, 5, or 7). Give the correct arrangement of digits and the two operations.

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer simplification Comment 3 of 3 |
First step:  find possible values for xxx times x equals xxxx s.t. each digit is a prime.  

So, don't solve the entire equation, just find a 3-digit number, a 1-digit number and a 4-digit number formed solely of those 4 digits.

It turns out there are only 4 possibilities:
325 * 7 = 2275,
555 * 5 = 2775,
755 * 5 = 3775,
775 * 3 = 2325
So the only possible arrangements for the first 2 lines:
325*77 = 25025  but 0 not prime
555*55 = 30525  but 0 not prime
755*55 = 41525  but 1,4 not prime
775*33 = 25575 <---  solution

The operators are '*' in front of the second line and '+' in front of the fourth line

      7 7 5
    *   3 3
  ---------
    2 3 2 5
+ 2 3 2 5
  ---------
  2 5 5 7 5

-------------------
baddigits = [str(i) for i in [0,1,4,6,8,9]]
possibles = []
for A in [2,3,5,7]:
    for B in [2,3,5,7]:
        for C in [2,3,5,7]:
            for D in [2,3,5,7]:
                three_digit_num = (100*A + 10*B + C)
                multiplier = D
                prod = three_digit_num*multiplier
                if prod < 1000 or prod > 9999:
                    continue
                strprod = str(prod)
                fail = False
                for s in strprod:
                    if s in baddigits:
                        fail = True
                if fail:
                    continue
                possibles.append([three_digit_num,multiplier,three_digit_num*multiplier])
                    
print(possibles)

OUTPUT:  [[325, 7, 2275], [555, 5, 2775], [755, 5, 3775], [775, 3, 2325]]


  Posted by Larry on 2025-02-19 13:26:23
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information