Let
N = 3 × 5 × 7 × 1 1 × 1 3 .
There are X possibilities for the units digit of a perfect square when it is represented in base N . Compute the last three digits of X (in base 10).
Details and Assumptions:
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.
you ned to prove that the number of quadratic residues m o d p is indeed 2 p + 1
Log in to reply
let's take few cases:
If prime 'p' is 3 ... any number under modulo '3' can be written as 3k or (3k ± 1) ... In which case the squares can be of the form 3k, or 3k + 1
If the prime 'p' is 5, any number under modulo '5' can be written as 5k, (5k ± 1) or (5k ± 2) ... in which case the remainders are of the form 5k, (5k+1) or (5k + 4)
In order to generalize this, any number under modulo 'p' ( ODD primes ) can be written as ( p ∗ k ± r ) , where 'r' ranges from 0 to ( p − 1 ) / 2 :
Each of whose squares give different possibilities of remainders.
So, the various possibilities of quadratic residues for odd primes are: ( n + 1 ) / 2
Number theory approach: Note that the question is asking for the possibilities of remainder when a perfect square is divided by N.
Therefore the answer is 2x3x4x6x7=1008.
Programming approach:
java code:
public class brilliant201409091623{
public static void main(String[] args){
boolean[] occur = new boolean[3*5*7*11*13];
int count = 0;
for(int i=0;i<3*5*7*11*13;i++){
occur[i*i%(3*5*7*11*13)] = true;
}
for(int i=0;i<3*5*7*11*13;i++){
if(occur[i]==true) count++;
}
System.out.println(count);
}
}
output:
1008
Press any key to continue . . .
Note: I manually found the remainder when squares of 0 to 12 are divided by 13 to know that there are 7 possibilities. Numbers 13 or above would have a remainder the same as 13 less than that number.
Note: I note that the number of possibilities of remainder when a square is divided by p is 2 p + 1 .
Here note that the unit digit of the perfect square a^2 written in base N is just the remainder when a^2 is divided by N. Now, let A be the set of the possible remainders when a perfect square is divided by N. And let A {3}, A {5}, A {7}, A {11} and A {13} be the sets of the possible remainders when a perfect square is divided by 3, 5, 7, 11 and 13 respectively. Let B a set that is equal to A 3 \times A 5 \times A 7 \times A {11} \times A {13}. Now, the crux move is that you can get a one-to-one correspondence between the sets A and B. The possible remainders when a perfect square is divided by 3, 5, 7, 11 and 13 are 2, 3, 4, 6 and 7. So, the number of elements in B is 2 \times 3 \times 4 \times 6 \times 7 which is also the number of elements in A. So A has got 1008 elements and consequently the correct answer would be 008.
Problem Loading...
Note Loading...
Set Loading...
First note that in base 1 0 , finding the X possibilities for the units digit is the same thing as finding the number of quadratic residues modulo 1 0 . Similarly, finding the X possibilities for the units digit in base N is the same as finding the number of quadratic residues modulo N . Now since N = 3 ⋅ 5 ⋅ 7 ⋅ 1 1 ⋅ 1 3 , this is equivalent to the product of the number of quadratic residues in modulo 3 , 5 , 7 , 1 1 and 1 3 by the Chinese Remainder Theorem. It is well known that the number of quadratic residues mod p is simply 2 p + 1 , so X = p = 3 , 5 , 7 , 1 1 , 1 3 ∏ 2 p + 1 = 1 0 0 8 ≡ 0 0 8 ( m o d 1 0 0 0 )