S is a square with no repeat digits.
C is a cube with no repeat digits.
F, a pandigital fifth power, is a scramble of the concatenation of the digits of S and C.
F does have repeat digits, but there are no digits which appear in F more than twice.
None of S, C, or F can end in zero.
F is the smallest pandigital fifth power that meets these conditions.
There are several (S,C) pairs that work with this F.
Find F and list all of the (S,C) pairs (there are less than 10)
The program finds 610 valid squares and 40 valid cubes. For each pair of square and cube if creates a combined set of digits in sorted order, and sees if that ordered set of digits is listed in the list of 11 valid fifth powers where each of them has also had its digits sorted in increasing order.
clearvars,clc
squares=[]; cubes=[]; fifths={}; sortfifths={};
ansSq=vpa(1);ansCu=vpa(0);ansFi=vpa(0);
cubes=[];
for i=1:100000
is=i^2;
ds=sort(num2str(is));
if isequal(ds,unique(ds)) ...
&& mod(is,10)>0
squares(end+1)=is;
end
end
for i=1:2145
is=i^3;
ds=sort(num2str(is));
if isequal(ds,unique(ds))
cubes(end+1)=is;
end
end
for i=sym(1):sym(9997)
is=i^5;
c=char(is);
n=c-'0';
[gc,~]=groupcounts(n');
if mod(is,10)>0 && max(gc)<3 && length(setdiff( '0123456789',c))==0
fifths{end+1}=is;
sortfifths{end+1}=sort(char(is));
end
end
for s=1:length(squares)
sq=num2str(squares(s));
for c=1:length(cubes)
cu=num2str(cubes(c));
combo=sort([sq cu]);
if ismember(combo,sortfifths)
for i=1:length(sortfifths)
if isequal(combo,sortfifths{i})
fifth=fifths(i);
break
end
end
disp([squares(s) cubes(c) fifth{1}])
ansSq(end+1)=squares(s);
ansCu(end+1)=cubes(c);
ansFi(end+1)=fifth{1};
end
end
end
[ ansFi,idx]=sort(ansFi);
ansSq=ansSq(idx);
ansCu=ansCu(idx);
for i=1:length(ansFi);
fprintf('%12d %12d %22s\n',ansSq(i),ansCu(i),ansFi(i));
end
From the list below F is 21047953604832 = 462^5.
The roots (square, cube, fifth) for the requested set are:
323 302 462
352 302 462
557 302 462
1017 135 462
1197 135 462
1428 135 462
1701 135 462
1953 135 462
3018 135 462
The sorted results list is:
square cube fifth power
104329 27543608 21047953604832 \
123904 27543608 21047953604832 |
310249 27543608 21047953604832 | The F and the (S, C) pairs
1034289 2460375 21047953604832 |
1432809 2460375 21047953604832 |
2039184 2460375 21047953604832 |
2893401 2460375 21047953604832 |
3814209 2460375 21047953604832 |
9108324 2460375 21047953604832 /
198025 24137569 62854912109375
198025 32461759 62854912109375
259081 24137569 62854912109375
259081 32461759 62854912109375
819025 24137569 62854912109375
819025 32461759 62854912109375
1054729 27543608 170484759256032
1974025 27543608 170484759256032
2715904 27543608 170484759256032
4507129 27543608 170484759256032
5470921 27543608 170484759256032
7295401 27543608 170484759256032
19847025 2460375 170484759256032
57108249 2460375 170484759256032
71520849 2460375 170484759256032
80514729 2460375 170484759256032
94187025 2460375 170484759256032
102576384 592704 170484759256032
105637284 592704 170484759256032
158306724 592704 170484759256032
176305284 592704 170484759256032
180472356 592704 170484759256032
183467025 592704 170484759256032
187635204 592704 170484759256032
208571364 592704 170484759256032
218034756 592704 170484759256032
284057316 592704 170484759256032
307265841 592704 170484759256032
316057284 592704 170484759256032
430728516 592704 170484759256032
472801536 592704 170484759256032
475283601 592704 170484759256032
560837124 592704 170484759256032
570684321 592704 170484759256032
576432081 592704 170484759256032
734681025 592704 170484759256032
783104256 592704 170484759256032
825470361 592704 170484759256032
853107264 592704 170484759256032
1034289 24137569 564708431199232
1034289 32461759 564708431199232
1432809 24137569 564708431199232
1432809 32461759 564708431199232
2039184 24137569 564708431199232
2039184 32461759 564708431199232
2893401 24137569 564708431199232
2893401 32461759 564708431199232
3814209 24137569 564708431199232
3814209 32461759 564708431199232
9108324 24137569 564708431199232
9108324 32461759 564708431199232
1763584 26198073 885623410917376
7458361 26198073 885623410917376
8317456 26198073 885623410917376
102738496 2460375 2436910203746875
172843609 2460375 2436910203746875
176039824 2460375 2436910203746875
273869401 2460375 2436910203746875
420783169 2460375 2436910203746875
478603129 2460375 2436910203746875
639027841 2460375 2436910203746875
683927104 2460375 2436910203746875
740329681 2460375 2436910203746875
816930724 2460375 2436910203746875
1026753849 592704 5514047299623807
1042385796 592704 5514047299623807
1098524736 592704 5514047299623807
1237069584 592704 5514047299623807
1248703569 592704 5514047299623807
1278563049 592704 5514047299623807
1285437609 592704 5514047299623807
1382054976 592704 5514047299623807
1436789025 592704 5514047299623807
1503267984 592704 5514047299623807
1532487609 592704 5514047299623807
1547320896 592704 5514047299623807
1643897025 592704 5514047299623807
1827049536 592704 5514047299623807
1927385604 592704 5514047299623807
1937408256 592704 5514047299623807
2076351489 592704 5514047299623807
2081549376 592704 5514047299623807
2170348569 592704 5514047299623807
2386517904 592704 5514047299623807
2431870596 592704 5514047299623807
2435718609 592704 5514047299623807
2571098436 592704 5514047299623807
2913408576 592704 5514047299623807
3015986724 592704 5514047299623807
3074258916 592704 5514047299623807
3082914576 592704 5514047299623807
3089247561 592704 5514047299623807
3094251876 592704 5514047299623807
3195867024 592704 5514047299623807
3285697041 592704 5514047299623807
3412078569 592704 5514047299623807
3416987025 592704 5514047299623807
3428570916 592704 5514047299623807
3528716409 592704 5514047299623807
3719048256 592704 5514047299623807
3791480625 592704 5514047299623807
3827401956 592704 5514047299623807
3928657041 592704 5514047299623807
3964087521 592704 5514047299623807
3975428601 592704 5514047299623807
3985270641 592704 5514047299623807
4307821956 592704 5514047299623807
4308215769 592704 5514047299623807
4369871025 592704 5514047299623807
4392508176 592704 5514047299623807
4580176329 592704 5514047299623807
4728350169 592704 5514047299623807
4730825961 592704 5514047299623807
4832057169 592704 5514047299623807
5102673489 592704 5514047299623807
5273809641 592704 5514047299623807
5739426081 592704 5514047299623807
5783146209 592704 5514047299623807
5803697124 592704 5514047299623807
5982403716 592704 5514047299623807
6095237184 592704 5514047299623807
6154873209 592704 5514047299623807
6457890321 592704 5514047299623807
6471398025 592704 5514047299623807
6597013284 592704 5514047299623807
6714983025 592704 5514047299623807
7042398561 592704 5514047299623807
7165283904 592704 5514047299623807
7285134609 592704 5514047299623807
7351862049 592704 5514047299623807
7362154809 592704 5514047299623807
7408561329 592704 5514047299623807
7680594321 592704 5514047299623807
7854036129 592704 5514047299623807
7935068241 592704 5514047299623807
7946831025 592704 5514047299623807
7984316025 592704 5514047299623807
8014367529 592704 5514047299623807
8125940736 592704 5514047299623807
8127563409 592704 5514047299623807
8135679204 592704 5514047299623807
8326197504 592704 5514047299623807
8391476025 592704 5514047299623807
8503421796 592704 5514047299623807
8967143025 592704 5514047299623807
9054283716 592704 5514047299623807
9351276804 592704 5514047299623807
9560732841 592704 5514047299623807
9614783025 592704 5514047299623807
9761835204 592704 5514047299623807
9814072356 592704 5514047299623807
|
Posted by Charlie
on 2024-12-18 09:44:12 |