Let X be the number of distinct possibilities for the units digit of a perfect cube when written in base 1 8 8 1 5 . Find the last three digits of X (in decimal base).
Details and assumptions
The prime factorization of 1 8 8 1 5 is 1 8 8 1 5 = 5 × 5 3 × 7 1 .
We're talking about 1 8 8 1 5 in its decimal representation.
This problem is similar to this one.
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.
EDIT: The lemma can also be proven without cyclotomic polynomials. Darn, I'm stupid. Anyways, note that a 3 ≡ b 3 ( m o d p ) gives ( a b − 1 ) 3 ≡ 1 ( m o d p ) , so the order of a b − 1 ( m o d p ) is either 1 or 3 . But since p ≡ 2 ( m o d 3 ) , φ ( p ) ≡ 1 ( m o d 3 ) , so the order cannot be 3 . It follows that a b − 1 ≡ 1 ( m o d p ) ⟹ a ≡ b ( m o d p ) , which is what we wanted. ■
java code:
public class brilliant201409091631{
public static void main(String[] args){
boolean[] occur = new boolean[18815];
int count = 0;
for(int i=0;i<18815;i++){
occur[(i*i%18815)*i%18815] = true;
}
for(int i=0;i<18815;i++){
if(occur[i]==true) count++;
}
System.out.println(count);
}
}
output:
18815
Press any key to continue . . .
Problem Loading...
Note Loading...
Set Loading...
First, note that the units digit of a number in base x is simply its remainder when divided by x . The problem simply asks for the number of distinct cubic residues modulo 1 8 8 1 5 .
The key observation here is that all prime factors of 1 8 8 1 5 are ≡ 2 ( m o d 3 ) .
*Lemma: * If x 3 ≡ y 3 ( m o d p ) for some integers x , y and a prime p ≡ 2 ( m o d 3 ) , then x ≡ y ( m o d p ) .
*Proof: * First, note that if x ≡ 0 ( m o d p ) , then y 3 ≡ 0 ( m o d p ) ⟹ y ≡ 0 ( m o d p ) . Now let x , y ≡ 0 ( m o d p ) . Assume x = y ( m o d p ) , so g cd ( p , x − y ) = 1 and p ∣ x 3 − y 3 ⟹ p ∣ ( x − y ) ( x 2 + x y + y 2 ) ⟹ p ∣ x 2 + x y + y 2 ⟹ ( x y − 1 ) 2 + ( x y − 1 ) + 1 ≡ 0 ( m o d p ) ⟹ Φ 3 ( x y − 1 ) ≡ 0 ( m o d p ) , where Φ 3 is the third cyclotomic polynomial ( Φ 3 ( z ) = z 2 + z + 1 ) . This implies either p = 3 or 3 ∣ p − 1 , none of which is the case since p ≡ 2 ( m o d 3 ) . ■
By the lemma, modulo p , the set { 0 3 , 1 3 , 2 3 , ⋯ , ( p − 1 ) 3 } is equivalent to { 0 , 1 , 2 , ⋯ , p − 1 } modulo p whenever p is a prime and p ≡ 2 ( m o d 3 ) , so the number of cubic residues modulo p is p . Thus, modulo 5 , 5 3 , 7 1 , the number of cubic residues are 5 , 5 3 , 7 1 respectively.
Now, we have to find the number of cubic residues modulo 1 8 8 1 5 . Let a i , b i , c i be any three cubic residues modulo 5 , 5 3 , 7 1 respectively. Let x 3 be an arbitrary cube. Consider the congruency system x 3 ≡ a i ( m o d 5 ) x 3 ≡ b i ( m o d 5 3 ) x 3 ≡ c i ( m o d 7 1 ) . By CRT, each of these congruency systems give rise to a unique solution modulo 1 8 8 1 5 . Conversely, for any cubic residue r modulo 1 8 8 1 5 , there exist unique a i , b i , c i such that whenever x 3 is a solution to the above congruency, x 3 ≡ r ( m o d 1 8 8 1 5 ) . Since a i , b i , c i can take 5 , 5 3 , 7 1 values respectively, the number of cubic residues modulo 1 8 8 1 5 is 5 × 5 3 × 7 1 = 1 8 8 1 5 , whose last three digits in decimal base are 8 1 5 .
This problem was inspired by v_Enhance's solution to Iran TST 2013 Set 1 Day 2 Problem 5 .