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

Home > Numbers
Find my number (Posted on 2011-12-19) Difficulty: 2 of 5
My number:
1. Is a 3-digit number.
2. All its digits are prime digits.
3. A number formed by its 1st 2 digits is prime.
4. So is the number formed by its last 2 digits.
5. It is the smallest number satisfying the above conditions.

Find it.

Rem: The digits in my number do not have to be distinct.

See The Solution Submitted by Ady TZIDON    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution re(3): No problem (spoiler), if composite | Comment 4 of 10 |
(In reply to re(2): No problem (spoiler), if composite by Dej Mar)

573 doesn't work as 57=3*19.

373 is the only one of the four remaining that is itself prime, per Ady's original intent, and so is not only the smallest, but also the only number satisfying that intent.

 

   10   dim Prd(4)
   20   Prd(1)=2
   21   Prd(2)=3
   22   Prd(3)=5
   23   Prd(4)=7
   40   for A=1 to 4:D1=Prd(A)
   50   for B=1 to 4:D2=Prd(B)
   60   for C=1 to 4:D3=Prd(C)
  100        Pr1=10*D1+D2:Prwhole=100*D1+10*D2+D3
  110        if prmdiv(Pr1)=Pr1                             then
  120          :Pr2=10*D2+D3
  130          :if prmdiv(Pr2)=Pr2 then
  140             :print Prwhole
  150   next
  160   next
  170   next
OK
run
 237
 373
 537
 737
OK

   10   dim Prd(4)
   20   Prd(1)=2
   21   Prd(2)=3
   22   Prd(3)=5
   23   Prd(4)=7
   40   for A=1 to 4:D1=Prd(A)
   50   for B=1 to 4:D2=Prd(B)
   60   for C=1 to 4:D3=Prd(C)
  100        Pr1=10*D1+D2:Prwhole=100*D1+10*D2+D3
  110        if prmdiv(Pr1)=Pr1 and prmdiv(Prwhole)=Prwhole then
  120          :Pr2=10*D2+D3
  130          :if prmdiv(Pr2)=Pr2 then
  140             :print Prwhole
  150   next
  160   next
  170   next
OK
run
 373
OK

 


  Posted by Charlie on 2011-12-20 10:20:35
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 (3)
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