Three prime numbers, p
1, p
2, p
3, are processed by multiplying the first by 7, the second by 8 and the third by 9, so you have
7p1, 8p2 and 9p3.
and it's found that
7p1 < 8p2 < 9p3.
Taken together, 7p1, 8p2 and 9p3 use all nine digits 1 - 9 exactly once each, with no zeros.
Also, the product of 7p1, 8p2 and 9p3 is a 9-digit number containing each digit 1 - 9.
What are the three processed primes, 7p1, 8p2 and 9p3?
I used the following mathematica code
dgts:={1,2,3,4,5,6,7,8,9};
prms=Permutations[dgts];
lng=Length[prms];
cnt=0;
For[i=1,i„Tlng,i++,
num=FromDigits[prms[[i]]];
If[Mod[num,9*8*7]ƒú0,
p1p2p3=num/(9*8*7);
facs=FactorInteger[p1p2p3];
lng2=Length[facs];
tot=Sum[facs[[j,2]],{j,1,lng2}];
If[tot==3,
p1=facs[[1,1]];
facs=FactorInteger[p1p2p3/p1];
p2=facs[[1,1]];
p3=p1p2p3/(p1*p2);
ary={{p1,p2,p3},{p1,p3,p2},{p2,p1,p3},{p2,p3,p1},{p3,p1,p2},{p3,p2,p1}};
For[j=1,j„T6,j++,
v1=7*ary[[j,1]];
v2=8*ary[[j,2]];
v3=9*ary[[j,3]];
v1d=IntegerDigits[v1];
v2d=IntegerDigits[v2];
v3d=IntegerDigits[v3];
digun=Union[v1d,v2d,v3d];
If[v1<v2 && v2<v3 && Length[v1d]+Length[v2d]+Length[v3d]ƒúLength[digun] && digun==dgts,
Print[p1," ",p2," ",p3];
Print[7*p1," ",8*p2," ",9*p3];
Print[7*8*9*p1*p2*p3];
];];];];];
and got the answer of p1=59 p2=71 and p3=103 which gives for 7p1,8p2,9p3
413, 568, 927
and for 7*8*9*p1*p2*p3
217459368
|
Posted by Daniel
on 2009-06-28 09:39:37 |