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

Home > Numbers
Near Goldbach Alphametics (Posted on 2009-06-10) Difficulty: 3 of 5
In the following alphametic equation each capital letter in bold represents a different base x digit from 0 to x-1. None of the numbers can contain any leading zero.

                        PRIME + PRIME + PRIME = NUMBER

Determine the minimum positive integer value of x such that PRIME is a prime number.

Bonus Question:

What would have been the minimum positive integer value of x, if each capital letter in bold represented a different base x prime digit from 2 to x-1?

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
program for part 2 Comment 2 of 2 |

Similar to what I used for part 1, but with added requirement:


   10   dim Psn(20)
  100         dim Used(100)
  190   kill "goldbach.txt"
  200         open "goldbach.txt" for output as #2
  300         cls
  400         for X=8 to 45
  500           Psn(1)=1
  600   for J=2 to 6
  700    Psn(J)=Psn(J-1)*X
  800   next
  900   :for P=2 to X-1:if prmdiv(P)=P then
 1000   :Used(P)=1
 1100   :for N=2 to X-1:if prmdiv(N)=N then
 1200   :if Used(N)=0 then
 1300   :Used(N)=1
 1400   :for R=2 to X-1:if prmdiv(R)=R then
 1500   :if Used(R)=0 then
 1600   :Used(R)=1
 1700   :for I=2 to X-1:if prmdiv(I)=I then
 1800   :if Used(I)=0 then
 1900   :Used(I)=1
 2000   :for M=2 to X-1:if prmdiv(M)=M then
 2100   :if Used(M)=0 then
 2200   :Used(M)=1
 2300   :for E=2 to X-1:if prmdiv(E)=E then
 2400   :if Used(E)=0 then
 2500   :Used(E)=1
 2600   :Prime=P*Psn(5)+R*Psn(4)+I*Psn(3)+M*Psn(2)+E
 2700   :for U=2 to X-1:if prmdiv(U)=U then
 2800   :if Used(U)=0 then
 2900   :Used(U)=1
 3000   :for B=2 to X-1:if prmdiv(B)=B then
 3100   :if Used(B)=0 then
 3200   :Used(B)=1
 3300   :Number=N*Psn(6)+U*Psn(5)+M*Psn(4)+B*Psn(3)+E*Psn(2)+R
 3400   :if 3*Prime=Number and prmdiv(Prime)=Prime then
 3500   :print X,P;R;I;M;E,N;U;M;B;E;R,Prime;Number
 3600   :print #2,X,P;R;I;M;E,N;U;M;B;E;R,Prime;Number
 3700   :endif
 3800   :Used(B)=0:endif
 3900   :endif
 4000   :next
 4100   :Used(U)=0:endif
 4200   :endif
 4300   :next
 4400   :Used(E)=0:endif
 4500   :endif
 4600   :next
 4700   :Used(M)=0:endif
 4800   :endif
 4900   :next
 5000   :Used(I)=0:endif
 5100   :endif
 5200   :next
 5300   :Used(R)=0:endif
 5400   :endif
 5500   :next
 5600   :Used(N)=0:endif
 5700   :endif
 5800   :next
 5900   :Used(P)=0:endif
 6000   :next
 6100   :next
 6200   :close
 6300 

checked up to base 45 and didn't find any answers.


  Posted by Charlie on 2009-06-11 16:03:12
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 (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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