0

Question:

The square of $567$ is $321,489$. These two numbers contain each of the digits from $1$ to $9$ exactly once between them. What other three-digit number and its square have this property?

I know what the answer is, I just don't know how to get there.

Jolly
  • 123
  • I assume you're not allowed to use a computer? Also, how did you get the answer? – Carl Schildkraut Oct 22 '18 at 00:11
  • If you can explain how to do this with a computer I'll take it. – Jolly Oct 22 '18 at 00:23
  • 1
    There's probably no better way than taking each three-digit number in turn, squaring it, and seeing which ones work. Well, you don't have to try any three-digit number with a repeated digit, or any ending in zero, one, five, or six, or any less than 316 (since the square would only be five digits), so that cuts down on the work a little. – Gerry Myerson Oct 22 '18 at 00:36
  • There is some information at http://oeis.org/A059930 – Gerry Myerson Oct 22 '18 at 00:42
  • 2
    @Jolly I did it with [x for x in range(317,1000) if set([int(k) for k in str(x)+str(x**2)])=={1,2,3,4,5,6,7,8,9}] – Carl Schildkraut Oct 22 '18 at 01:04

0 Answers0