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

Home > Numbers
Pandigital and Pretty Powerful VI (Posted on 2023-11-13) Difficulty: 3 of 5
Determine all possible triplet(s) (P, Q, N) of duodecimal positive integers, with P<Q and N≥3, such that the base 12 representations of PN and QN will together contain each of the digits 0 to B exactly once. Neither PN nor QN can contain any leading zero.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 3
for p=1:9999
  for q=p+1:9999
    for n=3:12
      pn=p^n;
      qn=q^n;
      if pn>flintmax ||qn>flintmax
        break
      end
      tst=[dec2base(pn,12) dec2base(qn,12)] ;
      if length(tst)>12
        break
      end
      if length(tst)== 12
        if length(unique(tst))==12
          disp([dec2base(p,12) ' ' dec2base(q,12) ' ' dec2base(n,12)])
          disp([dec2base(pn,12) ' ' dec2base(qn,12)])
          disp(' ')
        end
      end
    end
  end
end

This  should cover it as even in duodecimal, the maximum integer in floating  point, flintmax, is 15 duodecimal digits, even in the first power--too long not to duplicate a digit.


finds

>> pandigitalAndPrettyPowerfulVI

6 763 3
160 2B5497A83
 
12 305 3
1708 23B469A5
 
16 40B 3
3460 578A192B
 
 
 
showing:
P Q N
P^N Q^N

in each grouping, all in base 12.

  Posted by Charlie on 2023-11-13 09:24:27
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (8)
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