10 P=nxtprm(100)
20 while P<999
30 Ps=cutspc(str(P))
40 D1=mid(Ps,1,1):D1n=val(D1)
50 D2=mid(Ps,2,1):D2n=val(D2)
60 D3=mid(Ps,3,1):D3n=val(D3)
65 X0=P @ 100
70 A=val(D1+D3+D2):Ax=A @ 100
80 B=val(D2+D3+D1):Bx=B @ 100
90 C=val(D2+D1+D3):Cx=C @ 100
100 D=val(D3+D1+D2):Dx=D @ 100
110 E=val(D3+D2+D1):Ex=E @ 100
120 if prmdiv(A)<A and prmdiv(B)<B and prmdiv(C)<C and prmdiv(D)<D and prmdiv(E)<E then
121 :if prmdiv(Ax)<Ax and prmdiv(Bx)<Bx and prmdiv(Cx)<Cx and prmdiv(Dx)<Dx and prmdiv(Ex)<Ex and prmdiv(X0)<X0 then
125 :if prmdiv(D1n)=D1n and prmdiv(D2n)=D2n and prmdiv(D3n)=D3n then print P
130 P=nxtprm(P)
140 wend
finds
257
|
Posted by Charlie
on 2013-01-22 13:31:19 |