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

Home > Numbers
Prime squares with distinct digits 2 (Posted on 2023-05-02) Difficulty: 3 of 5
Determine the maximum value of a duodecimal (base 12) prime number N, such that none of the digits in the base 12 representation of N2 occur more than once.

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 2 of 2 |
clearvars,clc
largest=base2dec('ba9876543210',12);
p=prevprime(floor(sqrt(largest)));
while true
  duo=dec2base(p^2,12);
  if length(duo)==length(unique(duo))
    disp(duo)
    disp([p^2 p])
    break
  end
  p=prevprime(p-1);
end

goes down the list of primes from sqrt(BA9876543210) to find

B7045936281 as the largest such square of a prime.

There is probably some divisibility rule in base-12 to prevent any 12-digit pandigital from being the square of a prime.


In decimal the found square is 717370038529, which is the square of 846977, which in base 12 is 34A195.

  Posted by Charlie on 2023-05-02 10:57:05
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