(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 |