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

Home > Numbers
Pandigital Processed Primes (Posted on 2009-06-27) Difficulty: 3 of 5
Three prime numbers, p1, p2, p3, are processed by multiplying the first by 7, the second by 8 and the third by 9, so you have

7p1, 8p2 and 9p3.

and it's found that

7p1 < 8p2 < 9p3.

Taken together, 7p1, 8p2 and 9p3 use all nine digits 1 - 9 exactly once each, with no zeros.

Also, the product of 7p1, 8p2 and 9p3 is a 9-digit number containing each digit 1 - 9.

What are the three processed primes, 7p1, 8p2 and 9p3?

  Submitted by Charlie    
No Rating
Solution: (Hide)
   70   :for A=1 to 12251
   80   :Na=prm(A)*7:Nas=cutspc(str(Na))
   90   :if len(Nas)<4 then
  100   :for B=1 to 12251
  110   :Nb=prm(B)*8:Nbs=cutspc(str(Nb))
  120   :if len(Nbs)>=len(Nas) and 9-len(Nas)-len(Nbs)>=len(Nbs) then
  130   :for C=1 to 12251
  140   :Nc=prm(C)*9:Ncs=cutspc(str(Nc))
  160     :T$=cutspc(str(Na))+cutspc(str(Nb))+cutspc(str(Nc))
  170     :if len(T$)=9 then
  180       :Good=1
  190       :for I=1 to 9
  200         :if instr(T$,cutspc(str(I)))=0 then Good=0:endif
  210       :next
  211       :Prods=cutspc(str(Na*Nb*Nc))
  212       :for I=1 to 9
  213         :if instr(Prods,cutspc(str(I)))=0 then Good=0:endif
  214       :next
  220       :if Good then print Na;"= 7 *";Na//7;Nb;"= 8 *";Nb//8;Nc;"= 9 *";
                                                           Nc//9,Na*Nb*Nc:endif
  230     :endif
  250   :next
  260   :endif
  270   :next
  280   :endif
  290   :next
  300   :
  
finds

 413 = 7 * 59  568 = 8 * 71  927 = 9 * 103  where the product is 217459368.
 

So the numbers are 413, 568 and 927.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle Thoughts K Sengupta2023-04-24 01:37:10
solutionDaniel2009-06-28 09:39:37
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

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