Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I recently attended a test which ask me two question based on perfect squares; here they are:

$1.$ How many even perfect squares between $1000$ and $5000$ are divisible by both $5$ and $9$?

$2.$ Can there be a perfect square whose digits consists of exactly $4$ ones, $4$ twos and $4$ zeroes in any order?

I haven't done anything much on perfect squares so I was reluctant to attempt them during exams, although as I had some spare time after finishing the other questions, I tried thinking about the first problem and I noticed that only $3600$ seems to satisfy the conditions, which is correct, but I don't know how to get this mathematically? And for the second problem, I don't have any clue till now.

Unfortunately they haven't given me any solutions for the questions, nor any ideas as to how to solve them (mathematically)?

share|improve this question
    
For (a), it will have to be a multiple of $4$, and of $25$, so of $100$ (nice), but also of $9$, so of $900$. Now it is easy. –  André Nicolas Jul 10 '11 at 4:16
    
Whenever when you know the sum of the digits of a number, you know the number modulo 9. Knowing the digits but not the order means you know the sum... So whenever when you know the digits of a number, but not the order, one of the first things you should do is look modulo 9, and see if you can get any info which helps.... –  N. S. Aug 22 '12 at 15:47
add comment

3 Answers

up vote 10 down vote accepted

For 1) Try to find all $k$ such that

$$ 1000 \leq 2\times 2 \times 5\times 5 \times 9 \times k^2 \leq 5000$$

For 2)

Any such number is divisible by $3$, but not by $9$ (look at the sum of digits, which gives the remainder upon dividing by $3$ and $9$).

In both, we are using the fact that if a prime $p$ divides $n^2$, then so does $p^2$.

share|improve this answer
    
I have some doubts,for $1$) why we need to take care of $2$ too? For $2$) How does divisibility of $3$ ensures that it is not perfect square? –  Quixotic Jul 10 '11 at 20:26
    
Dear Debanjan, for 1) the problem asks for all even squares between 1000 and 5000. any even square is a multiple of 4 (plus you have an extra condition that this number be a multiple of 5 and 9, so it must be divisible by 4*25*9, since these are pairwise relatively prime. so if a number is divisible by 4,5,9 it must be divisible by 4*25*9 (if a square is divisible by 5 it must be divisible by 25, as Aryabhata pointed out). for 2), if a square is divisible by 3, it must be divisible by 9. But it was shown that this number is divisible by 3 but not by 9, so it can't be a perfect square. –  algebra_fan Jul 10 '11 at 20:34
    
@algebra_fan:Thanks got it! :-) –  Quixotic Jul 10 '11 at 20:36
add comment

Edit: I wrongly applied the method of casting-out nines, but there may be part of my original post worth keeping (with some rewriting); specifically, I have the impression that the OP, maybe others, may gain something by seeing the basic modular arithmetic underlying the answers that I laid out, and how it is used. I invite comments.

EDIT One method used to answer is that of congruence; the most effective method is the one used in other posts, of using congruence mod9; I I will illustrate the method mod10 , whereby a perfect square must have a right-most digit ending in 0,1,4,5,6,9 . You can apply/adapt the same to the case mod9 used by Aryabhat and others. The innefectiveness of using mod10 here is that it does not exclude as squares those digits ending in either 0 or 1. So I will just show how/why we can use this method dismiss numbers ending in 2 as possible squares.

Mod10 Another ex 2 is this: when working $mod10$, the only possible remainders of a square are 0,1,4,5,6,9, but not 2,3 or 7, and your number with 4 0's 4,1's, and 4 2's will be congruent to: $4(1)+4(0)+4(2)=2 mod10$

For a quick proof of this last fact:

$0^2$ is 0(mod10)

$1^2$ is 1(mod10)

$2^2$ is 4(mod10)

$3^2$ is 9(mod10)

$4^2$ is 6(mod10)

$5^2$ is 5(mod10)

and 6,7,8,9, are respectively 6,9, 4, 1 mod 10.

And if k>10 , then write k=10c+a , with a<10, e.g., 357=35(10)+7 , then:

$(10c+a)^2=100c^2+2(10)+a^2 $ is $a^2 mod 10$, but the case of a has already been covered.

share|improve this answer
    
This is wrong. 222211110000 is not congruent to 2 modulo 10. Did you miss the "any order" part of the question? –  Aryabhata Jul 9 '11 at 19:08
    
I think you misunderstood question 2. The number has 12 digits: 4 0s, 4 1s, and 4 2s. So the number could be congruent to 0, 1 or 2 mod 10. –  Corey Jul 9 '11 at 19:11
    
I think he meant to cast out nines, and note that a number with 4 0's, 4 1's and 4 2's is equivalent to 3 mod 9 –  deinst Jul 9 '11 at 19:19
    
Yes,deinst I did mean to cast out nines, instead using the absurd congruence test that abc..mod10=a+b+c...(mod10). –  gary Jul 9 '11 at 21:09
1  
@gary: I'd be in favour of deleting the post, but more importantly, if you don't delete it, you should put the "Edit:" notice at the top so people won't spend time trying to understand something wrong (or worse, remember it as right :-). –  joriki Jul 9 '11 at 22:41
show 2 more comments

Answer to Ques. 1 is: Only one such perfect square, i.e. 3600. Here we need to find perfect squares divisible by 4x9x25=900.

Answer to Ques. 2 is: No. Because taking the square root of the lowest and the highest 12 digit numbers we get 317200 and 1000000, that means we cannot start with a number say 1012. Hence No.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.