What is the smallest integer greater than 1 such that $\frac12$ of it is a perfect square and $\frac15$ of it is a perfect fifth power?

I have tried multiplying every perfect square (up to 400 by two and checking if it is a perfect 5th power, but still nothing. I don"t know what to do at this point.

You are watching: What is the smallest integer greater than 58


*

*

This is like code golf...

The answer is 500000.

Proof by computation: (in R)


$\begingroup$ But... the OP didn't ask how to (in general) FIND the answer. They asked what the answer was, presumably with the minimal proof needed to verify it. I joked about code golf because I tried to give the shortest, most transparent possible demonstration that the result was correct. $\endgroup$
The number is clearly a multiple of $5$ and $2$. We look for the smallest, so we assume that it has no more prime factors.

So let $n=2^a5^b$. Since $n/2$ is a square, then $a-1$ and $b$ are even. Since $n/5$ is a fifth power, $a$ and $b-1$ are multiples of $5$. Then $a=5$ and $b=6$.


*

Here"s a very unsophisticated approach: Let $n$ be the smallest such integer. Then there exist integers $a$ and $b$ such that $n=5a^5$ and $n=2b^2$. It follows that $a$ is a multiple of $2$, say $a=2a_1$, and $b$ is a multiple of $5$, say $b=5b_1$. Then$$n=2^5\cdot5\cdot a_1^5\qquad\text{ and }\qquad n=2\cdot5^2\cdot b_1^2.$$This in turn shows that $a_1$ is a multiple of $5$, say $a_1=5a_2$, and $b_1$ is a multiple of $2$, say $b_1=2b_2$. Then$$n=2^5\cdot5^6\cdot a_2^5\qquad\text{ and }\qquad n=2^3\cdot5^2\cdot b_2^2.$$This in turn shows that $b_2$ is a multiple of both $2$ and $5^2$, say $b_2=2\cdot5^2\cdot b_3$. Then $$n=2^5\cdot5^6\cdot a_2^5\qquad\text{ and }\qquad n=2^5\cdot5^6\cdot b_3^2.$$This shows that $n\geq2^5\cdot5^6$, and as you might expect a quick check shows that $n=2^5\cdot5^6$ does indeed work, so $n=2^5\cdot5^6=500000$.


Share
Cite
Follow
edited Nov 27 "19 at 11:44
*

YiFan
15k44 gold badges2222 silver badges5555 bronze badges
answered Oct 29 "18 at 14:31
*

ServaesServaes
54.6k77 gold badges6464 silver badges145145 bronze badges
$\endgroup$
1
Add a comment |
9
$\begingroup$
I am writing this answer because you said that you were trying a guess and check method. Computers are good at this. A decent algorithm is to have two integers $n_x$ and $n_y$ which start at 1. Then, calculate x by doing $2n_x^2$ and y by doing $5n_y^5$. Check if they are equal; if they are, you found your answer. If not, whichever of $x$ and $y$ are lower, increment that $n$ value (i.e., if $x , then increment $n_x$). Recalculate $x$ and $y$ and repeat until they are the same.

Here is an example implementation in Python using generators:

class SpecialSquareGenerator: def __init__(self, n=0): self.n = n def __iter__(self): return self def __next__(self): self.n += 1 return self.n, 2*(self.n**2)class SpecialFifthGenerator: def __init__(self, n=0): self.n = n def __iter__(self): return self def __next__(self): self.n += 1 return self.n, 5*(self.n**5)def special_square(): n = 0; ss = SpecialSquareGenerator() sf = SpecialFifthGenerator() nx, x = next(ss) ny, y = next(sf) print("{0}: {1}\t{2}: {3}".format(nx, x, ny, y)) while True: if (x == y): return x if x Running it returns the right answer:

gns-mac1:sandbox gns$ python3 special_square.py 1: 2 1: 52: 8 1: 52: 8 2: 1603: 18 2: 160...(output omitted)494: 488072 10: 500000495: 490050 10: 500000496: 492032 10: 500000497: 494018 10: 500000498: 496008 10: 500000499: 498002 10: 500000500: 500000 10: 500000500000Of course, the rememberingsomer.comematical approach is better for understanding the problem. But if you need to guess and check, then computers are the tool for that.

P.S.

There is another way to exhaustively search for the solution. You can take sequential numbers and try dividing them by 2 (or 5) and then taking the square root (or fifth root) and then checking if that result is an integer for both operations. There are two downsides to this approach:

You have to decide if a floating point number is supposed to represent an integer. This is hard for computers and language implementations to do because computers only have a fixed set of digits to represent floating point numbers.The search space is greater (by order of $n^2$). So that means that you should expect to take longer to reach the same answer, given the same hardware.

P.S.S.

See more: Author Topic: How Many Holes Does A Bowling Ball Have, How Many Holes Are On A Standard Bowling Ball

There are faster ways to implement both my algorithm, and the other I mentioned in the postscript. For example, you can double $n$ each time and then when you overshoot, use binary search in the space between the last $n$ and the one that overshot.