All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Included in both A^B and B^A (Posted on 2023-06-01) Difficulty: 3 of 5
1) 'A' and 'B' are positive zeroless 2-digit integers which have one digit in common.
A 6-digit sequence, S, composed of only 3 unique digits, occurs in both A^B and B^A.
Find A, B, and S.

2) 'C' and 'D' are two other positive zeroless 2-digit integers which also have one digit in common.
A 6-digit sequence, T, composed of 6 unique digits, occurs in both C^D and D^C.
Find C, D, and T.

Neither S nor T has any leading zero.

See The Solution Submitted by Larry    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
I didn't change the variable names for the second part, but that doesn't affect the answer, given the Bard's quote.

clearvars,clc
for a=11:99
  as=char(string(a));
  for b=11:99
    bs=char(string(b));
    abs=[as bs];
    if isequal(strfind(abs,'0'),[] ) ...
        && length(intersect(as,bs))==1 ...
        && a~=b
      if length(intersect(as,bs))==1
        ab=char(sym(a)^b);
        ba=char(sym(b)^a);
        for i=1:length(ba)-5
          if length(unique(ba(i:i+5)))==3
            s=ba(i:i+5);
            p=strfind(ab,ba(i:i+5));
            if ~isequal(p,[])
              disp([as ' ' bs ' ' s ' ' ab ' ' ba])
            end
          end
        end
      end
    end
  end
end

disp(' ')

clearvars 
for a=11:99
  as=char(string(a));
  for b=11:99
    bs=char(string(b));
    abs=[as bs];
    if isequal(strfind(abs,'0'),[] ) ...
        && length(intersect(as,bs))==1 ...
        && a~=b
      if length(intersect(as,bs))==1
        ab=char(sym(a)^b);
        ba=char(sym(b)^a);
        for i=1:length(ba)-5
          if length(unique(ba(i:i+5)))==6
            s=ba(i:i+5);
            p=strfind(ab,ba(i:i+5));
            if ~isequal(p,[])
              disp([as ' ' bs ' ' s ' ' ab ' ' ba])
            end
          end
        end
      end
    end
  end
end


finds

1)
 A  B    S               The results of the exponentiations
79 94 335375 
             238202645946674671901844030131688261840455609040130839498451613353756747499045969428775114432599223
68471508951254043301841598310810959122639093018750573711401473264757112263998881 
             753529803906603364328062684879905074416038191684436076994112942137793353750693678788439419755385754
714791974652553974362629067333843924654151549669661999104
             
94 79 335375 
             753529803906603364328062684879905074416038191684436076994112942137793353750693678788439419755385754
714791974652553974362629067333843924654151549669661999104 
             238202645946674671901844030131688261840455609040130839498451613353756747499045969428775114432599223
68471508951254043301841598310810959122639093018750573711401473264757112263998881

2) 
 C  D    T               The results of the exponentiations
59 89 432061 
             403486525674138721277358818163343412346056820000557049137740680894095772750769877883643206109427169
31267361565319605418282649582007448319855547952616453971739 
             103278611857003616688625589179443206140188442838630835763439139309446407559324649401479846415941859
20164994365747209
89 59 432061 
             103278611857003616688625589179443206140188442838630835763439139309446407559324649401479846415941859
20164994365747209 
             403486525674138721277358818163343412346056820000557049137740680894095772750769877883643206109427169
31267361565319605418282649582007448319855547952616453971739

Edited on June 1, 2023, 3:20 pm
  Posted by Charlie on 2023-06-01 14:51:22

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information