A Perfect Square? No Way!

For how many positive integers n < 1 0 6 n<10^6 is 2 × n ! × ( n + 2 ) ! 2\times n! \times (n+2)! a perfect square?


The answer is 7.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Discussions for this problem are now closed

Eddie The Head
Apr 26, 2014

We have to find the values of n n for which 2 n ! ( n + 2 ) ! 2*n!*(n+2)! is a perfect square which is clearly equivalent to proving 2 ( n + 1 ) ( n + 2 ) 2(n+1)(n+2) to be a perfect square.

So we have for some integer k k , 2 ( n + 1 ) ( n + 2 ) = k 2 2(n+1)(n+2) = k^{2} 2 n 2 + 6 n + 4 = k 2 2n^{2}+6n+4 = k^{2} 2 n 2 + 6 n + 4 k 2 = 0 2n^{2}+6n+4- k^{2} = 0

So the discriminant of this equation should be a perfect square to yield integer solutions(that is the sufficient condition in this case and it can be proved by checking) for n n ,hence,

36 4 2 ( 4 k 2 ) = p 2 36 - 4*2*(4-k^{2}) = p^{2} 4 + 8 k 2 = p 2 4+8k^{2} = p^{2} p 2 8 k 2 = 4 p^{2} - 8k^{2} = 4 Now if pis odd,the RHS can never be even,so p p must be even,say p = 2 p 1 p =2p_1 , 4 p 1 2 8 k 2 = 4 4p_1^{2} - 8k^{2} = 4 p 1 2 2 k 2 = 1 p_1^{2} - 2k^{2} = 1 p 1 2 = 2 k 2 + 1 p_1^{2} = 2k^{2} + 1 Now k must be even,otherwise p 1 2 p_1^{2} will become of the form 4 k + 3 4k+3 which cannot be a perfect square.So let k = 2 k 1 k = 2k_1 p 1 2 = 8 k 1 2 + 1 p_1^{2} = 8k_1^{2} + 1 p 1 2 8 k 1 2 = 1 p_1^{2} - 8k_1^{2} = 1 Now clearly have a Pell's equation ,whose one trivial solution is p 1 = 3 p_1 = 3 and k 1 = 1 k_1 = 1 . So the other solutions can be obtained from the recurrence x k + 1 = x 1 x k + n y 1 y k x_{k+1} = x_1x_k+ny_1y_k and y k + 1 = x 1 y k + y 1 x k y_{k+1} = x_1y_k+y_1x_k .[put p p in place of x x and k k in place of y y .

And each of values correspond to a positive value of integer n n .

Now since we are given n < 1 0 6 n<10^{6} ,the largest possible permissible value in the recurrence relation will be p 8 = 665857 p_8 = 665857 and k 8 = 235416 k_8 = 235416 and this corresponds to n n having a value of 332927 332927 .But p 1 = 3 p_1 = 3 and k 1 = 1 k_1=1 makes n = 0 n=0 and hence it should not be counted.

So the total number of values of n n possible is 7 \boxed{7} .

A more direct approach with the equation 2 ( n + 1 ) ( n + 2 ) = k 2 2(n+1)(n+2) = k^2 , is that since ( n + 1 ) ( n + 2 ) (n+1) (n+2) is very close to ( n + 3 2 ) 2 (n+ \frac{3}{2})^2 , we transform the equation into ( 2 n + 3 ) 2 1 = 2 k 2 (2n+3)^2 - 1 = 2k^2 . This gives us the Pell's equation X 2 2 Y 2 = 1 X^2 - 2Y^2 = 1 (which is more familiar), with the base case ( X , Y ) = ( 3 , 2 ) (X, Y) = (3, 2) .

Calvin Lin Staff - 7 years, 1 month ago

Similar to Calvin's suggestion another way to get the standard Pell's equation is to note that n + 1 n+1 and n + 2 n+2 are relatively prime and hence one of them must be 2 p 2 2p^2 and the other q 2 q^2

Rajesh Pavan Sunkari - 7 years, 1 month ago

Brilliant! :)

Weird Al - 7 years, 1 month ago
Kevin Bourrillion
Apr 25, 2014

This equals 2 ( n ! 2 ) ( n + 1 ) ( n + 2 ) 2 (n!^{2})(n+1)(n+2) , so it is a square when 2 ( n + 1 ) ( n + 2 ) 2(n+1)(n+2) is. Notice that this value is 4 times the ( n + 2 ) (n+2) th triangular number, so the problem reduces to counting the triangular numbers from the 3rd (6) up to the 1,000,001st (some 12-digit number) that are perfect squares.

I remembered a recurrence for square triangular numbers (after 0 and 1); the next after a and b is 34 b a + 2 34b - a + 2 . So this gives

36, 1225, 41616, 1413721, 48024900, 1631432881, 55420693056 and then we get to a 13-digit number.

So the answer is 7. I hope there's a more direct way to solve this one.

There is :)

Calvin Lin Staff - 7 years, 1 month ago

That's what I love about math. Alas, I suspect it will be posted by not-me!

Kevin Bourrillion - 7 years, 1 month ago

Haha!

Joshua Ong - 7 years, 1 month ago
Bhagirath Mehta
Apr 28, 2014

I used a table and was able to find a few values for n that would make n a perfect square. After I found 7, 48 and 287, I realized that from (n+1) and (n+2), one had to be a perfect square and one had to be a perfect square divided by 2. I looked at the (n+1), or (n+2), (whichever one was the perfect square) that I found and searched for a sequence that matched the square roots of (n+1) or (n+2).

One sequence did. Numerators of continued fraction convergent to sqrt(2). Look at Look athttps://oeis.org/search?q=3%2C+7%2C+17&language=english&go=Search.

In fact, sqrt(n+1) or sqrt(n+2) always equaled one of these numbers. As a result, I was able to use this sequence I found and was able to determine n by reversing the process.

I found 7, 48, 287, 1680, 9800, 57120 and 332927.

Indeed. The relationship between continued fractions and this problem, is through Pell's Equation. See Eddie's solution above.

Calvin Lin Staff - 7 years, 1 month ago

We needed to find all the triangular numbers which are also squares. And I found a formula on wikipedia for them.

Adrian Neacșu - 7 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...