The two words in the name of ROSE-INNES are squares,while OR is a prime number.
What are these numbers?
clearvars
lets='rosein ';
lets=uniqueperms(lets);
for i=1:length(lets)
code=lets(i,:);
rose=str2double(translate('rose',code));
sr=round(sqrt(rose));
if sr*sr==rose
code=lets(i,:);
innes=str2double(translate('innes',code));
sr=round(sqrt(innes));
if sr*sr==innes
disp([rose innes])
end
end
end
function tr=translate(a,code)
b=zeros(1,length(a));
for i=1:10
c=code(i);
idx=a==c;
b(find(idx))=char(string(i-1));
end
tr=char(b);
end
finds
rose innes
9216 53361
2916 53361
29 is a prime, but 92 is not, so rose is 9216 and 53361 is innes.
|
Posted by Charlie
on 2024-01-21 10:21:13 |