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

Home > Numbers
Thrice three is nine (Posted on 2010-09-11) Difficulty: 3 of 5
Three 3-digit primes, all digits being distinct, sum up to a three digit number.
Can you find this number?

Please provide answers to two distinct versions of the problem:
a. No zeroes allowed .
b. Zeroes, non-leading of course, can appear on both sides of the equation.

No Solution Yet Submitted by Ady TZIDON    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 5

  10   A=99
  20   repeat
  30    A=nxtprm(A):Aa=cutspc(str(A))
  40    Good=1
  50    for I=1 to 2
  60      if instr(mid(Aa,I+1,*),mid(Aa,I,1))>0 then Good=0
  70    next I
  80    if Good then
 110      :B=A
 120      :repeat
 130      :B=nxtprm(B):Bb=cutspc(str(B))
 140      :Good=1
 145      :if instr(Aa,mid(Bb,3,1))>0 then Good=0:endif
 150      :for I=1 to 2
 160      :if instr(mid(Bb,I+1,*)+Aa,mid(Bb,I,1))>0 then Good=0:endif
 170      :next I
 180      :if Good then
 210           :C=B
 220           :repeat
 230           :C=nxtprm(C):Cc=cutspc(str(C))
 240           :Good=1
 245           :if instr(Aa+Bb,mid(Cc,3,1))>0 then Good=0:endif
 250           :for I=1 to 2
 260           :if instr(mid(Cc,I+1,*)+Aa+Bb,mid(Cc,I,1))>0 then Good=0:endif
 270           :next I
 280           :if Good and A+B+C<1000 then print A;B;C,A+B+C:Ct=Ct+1:endif
 310           :until C>999
 320      :endif
 330      :until B>999
 340    :endif
 350   until A>999
 400   print Ct

produces

    primes       sum
 103  269  457   829
 103  269  487   859
 103  269  547   919
 103  269  587   959
 107  283  569   959
 109  257  463   829
 109  263  457   829
 109  263  487   859
 109  263  547   919
 109  263  587   959
 109  283  457   849
 109  283  467   859
 109  283  547   939
 149  263  587   999
 157  263  409   829
 157  283  409   849
 163  257  409   829
 167  283  409   859
 167  283  509   959
 


of which only  149 + 263 + 587 = 999 lacks a zero.
 


  Posted by Charlie on 2010-09-11 16:22:45
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 (23)
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