Fifth power remainders

For any prime p > 7 , p>7, consider the remainders when the fifth powers (i.e. n 5 n^5 ) are divided by p p . Let f ( p ) f(p) be the smallest possible remainder which is not 0 or 1.

The sum of the two smallest possible ratios p f ( p ) \frac{p}{f(p)} can be written as a b \frac{a}{b} , where a a and b b are coprime positive integers. What are the last three digits of the value of a + b a+b ?

Details and assumptions

As an explicit example, for p = 13 p=13 , you can verify that the possible remainders are 0 , 1 , 2 , , 12 0, 1, 2, \ldots, 12 . Thus f ( 13 ) = 2 f(13) = 2 .


The answer is 113.

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.

2 solutions

Zi Song Yeoh
Sep 10, 2013

FIrstly, if 5 p 1 5 \nmid p - 1 , then gcd ( 5 , p 1 ) = 1 \gcd(5, p - 1) = 1 . We claim that a 5 b 5 ( m o d p ) a b m o d p a^5 \equiv b^5 \pmod{p} \Rightarrow a \equiv b \mod{p} . The case when p a p \mid a is obvious, so assume that a a and b b are relatively prime to p p . Note that by Fermat's little theorem, a p 1 b p 1 1 ( m o d p ) a^{p - 1} \equiv b^{p - 1} \equiv 1 \pmod{p} . So, a gcd ( 5 , p 1 ) b gcd ( 5 , p 1 ) ( m o d p ) a^{\gcd(5, p - 1)} \equiv b^{\gcd(5, p - 1)} \pmod{p} , which implies a b ( m o d p ) a \equiv b \pmod{p} . Thus, by the claim, there exists an integer n n such that n 5 2 ( m o d p ) n^5 \equiv 2 \pmod{p} . (For { 1 5 , 2 5 , . . . , ( p 1 ) 5 1^5, 2^5, ..., (p - 1)^5 } = { 1 , 2 , . . . , p 1 1, 2, ..., p - 1 } mod p p ). This implies f ( p ) = 2 f(p) = 2 . So, the minimum possible value of the fraction p f ( p ) \frac{p}{f(p)} purely depends on p p . Thus, the minimum value of the fraction for this case is 13 2 \frac{13}{2} . (Since p > 7 p > 7 .)

Secondly, let 5 p 1 5 \mid p - 1 . Then, p = 10 k + 1 p = 10k + 1 for some integer k k . By direct computation for the cases k = 1 , 3 , 4 , 6 , 7 k = 1, 3, 4, 6, 7 and 10 10 , we find that the two smallest possible values of the fraction is 11 10 \frac{11}{10} and 71 20 \frac{71}{20} (obtained from k = 1 , 7 k = 1, 7 .) . It is clear that 71 20 < 13 2 \frac{71}{20} < \frac{13}{2} , so we just have to check that there are no more smaller fractions for k > 10 k > 10 . Since for k = 11 k = 11 , p p is not a prime, we just have to check for k 12 k \ge 12 or p 121 p \ge 121 . For p 121 p \ge 121 , 2 5 32 ( m o d p ) 2^5 \equiv 32 \pmod{p} . So, f ( p ) 32 f(p) \le 32 . Thus, p f ( p ) p 32 121 32 71 20 \frac{p}{f(p)} \ge \frac{p}{32} \ge \frac{121}{32} \ge \frac{71}{20} . This implies that the two smallest possible value of the fraction is indeed 11 10 \frac{11}{10} and 71 20 \frac{71}{20} . Their sum is 93 20 \frac{93}{20} . So, a + b = 113 a + b = \boxed{113} .

Note : f ( 11 ) = 10 , f ( 31 ) = 5 , f ( 41 ) = 3 f(11) = 10, f(31) = 5, f(41) = 3 , f ( 61 ) = 11 , f ( 71 ) = 20 , f ( 101 ) = 6 f(61) = 11, f(71) = 20 , f(101) = 6 .

Moderator note:

Great job! Nice solution and explanation.

Looks solid!

I have trouble understanding one step; How does a g c d ( 5 , p 1 ) b g c d ( 5 , p 1 ) a^{gcd(5,p-1)} \equiv b^{gcd(5,p-1)} follow from the previous statements?

Ton de Moree - 7 years, 9 months ago

Log in to reply

Apply [Bezout's Lemma]: gcd ( x , y ) = n x + m y \gcd(x,y) = nx+my for some integers n , m n, m .

Calvin Lin Staff - 7 years, 8 months ago

This is a famous lemma(theorem?).

Zi Song Yeoh - 7 years, 9 months ago

The smallest case (p=11) can be proven with Fermat's Little Theorem:

a 10 1 m o d 11 a^{10} \equiv 1 \mod 11

Therefore a 5 1 a^{5} \equiv 1 or 1 m o d 11 -1 \mod 11 , so f ( 11 ) = 10 f(11) = 10 .

I tried to find similar logic for the other cases 10 k + 1 10k +1 but couldn't get anything conclusive and had to fall back on brute force.

Matt McNabb - 7 years, 9 months ago

To clarify, by "direct computation" you mean that you worked out n^5 mod 101 for all values 2 <= n < 101, etc. ?

Matt McNabb - 7 years, 9 months ago

Log in to reply

Not necessarily. If we want to calculate the exact value of f ( 101 ) f(101) , then yes we have to check the different values.

If however, we already suspect that 71 leads to the second smallest value, we merely need to check that 101 f ( 101 ) > 71 20 ) \frac{ 101}{f(101)} > \frac{71}{20)} . This can be verified since 4 5 14 ( m o d 101 ) 4^5 \equiv 14 \pmod{101} , hence f ( 101 ) 14 f(101) \leq 14 .

Similarly, we didn't calculate the exact values of f ( 31 ) , f ( 41 ) , f ( 61 ) f(31), f(41), f(61) , but just showed that p f ( p ) > 4 > 71 20 \frac{p}{f(p) } > 4 > \frac{71}{20} .

Calvin Lin Staff - 7 years, 8 months ago
Etienne Vouga
Sep 8, 2013

If p-1 is relatively prime to 5, f(p) is always 2, so the best we can do is 13/2.

Now suppose p-1 is divisible by 5, i.e. p = 10k + 1. Direct computation for k = 1, 3, 4, 6, 7, and 10 gives that the best two fractions are 11/10 and 71/20, which are both less than 13/2. There is also no need to continue further, since 2^5 is always a fifth power and 71/20 < 131/32 <= p/f(p) for p > 101.

Moderator note:

Great job! Nice solution, cleanly written.

Mathematically, this solution is the same as Zi Song Y.'s, so if anyone is looking for more details, read the Zi Song Y.'s post.

Excellent!

Alexander Borisov - 7 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...