Let f ( x ) = ( x 3 + x + 2 ) 7 1 . Find the remainder when f ( 0 ) + f ( 1 ) + f ( 2 ) + ⋯ + f ( 2 1 0 ) is divided by 2 1 1 .
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.
The point of the Number Theory section is to work on your Math Skills, not your Programming skills. Nice little program, but even I can do that. No offense.
Log in to reply
Yes, I know, but I read somewhere that programming solutions are also acceptable :) Can I see your (or someone's) mathematical solution?
Use that for prime p and n that is not divisible by p-1 we have p ∣ i = 1 ∑ p − 1 i n
Log in to reply
It's great that you identified the most important aspect of the proof. Can you explain why this is true?
Log in to reply
On the contrary, assume there exists a positive integer n such that p − 1 ∣ n , but p ∣ k = 0 ∑ p − 1 k n . Let n be the smallest positive integer satisfying this property. We write n = m × ( p − 1 ) + r , where m ≥ 0 and 0 ≤ r < p − 1 by the division algorithm. Then, note that k = 0 ∑ p − 1 k n = k = 0 ∑ p − 1 k m × ( p − 1 ) + r = k = 0 ∑ p − 1 ( k p − 1 ) m × k r ≡ k = 0 ∑ p − 1 k r ( m o d p ) where the last step follows from Fermat's Little Theorem. This shows that if n satisfies the condition, so does r . Since n is the smallest positive integer satisfying this condition, either r = 0 or r = n . However, r = 0 ⟹ p − 1 ∣ n , a contradiction. So we must have m = 0 , n = r . Also note that this implies 1 ≤ n < p − 1 . For all smaller integers i , p must divide k = 0 ∑ p − 1 k i . From Pascal's identity, we have k = 0 ∑ n ( k n + 1 ) ( 1 k + 2 k + ⋯ + p k ) = ( p + 1 ) n + 1 − 1 ⟹ k = 0 ∑ n − 1 ( k n + 1 ) ( 1 k + 2 k + ⋯ + p k ) + ( n n + 1 ) ( 1 n + 2 n + ⋯ + p n ) = ( p + 1 ) n + 1 − 1 Note that ( p + 1 ) n + 1 − 1 ≡ 1 − 1 ≡ 0 ( m o d p ) , and also note that k = 0 ∑ n − 1 ( k n + 1 ) ( 1 k + 2 k + ⋯ + p k ) ≡ 0 ( m o d p ) . Hence we must have ( n + 1 ) ( 1 n + 2 n + . . . + p n ) ≡ 0 ( m o d p ) . But p > n + 1 from our previous observation, so g cd ( n + 1 , p ) = 1 , implying p ∣ 1 n + 2 n + ⋯ + ( p − 1 ) n , a contradiction. This proves our claim. QED
The rest of the analysis is trivial. Let c n denote the coefficient of x n in ( x 3 + x + 2 ) 7 1 . The given sum can be rearranged as n = 0 ∑ 7 1 × 3 c n ( 1 n + 2 n + ⋯ + 2 1 0 n ) From our claim, all other terms leave no remainder when divided by 2 1 1 other than c 2 1 0 × ( 1 2 1 0 + 2 2 1 0 + ⋯ + 2 1 0 2 1 0 ) and c 0 × ( 1 0 + 2 0 + ⋯ + 2 1 0 2 1 0 ) By Fermat's Little theorem, 1 2 1 0 + 2 2 1 0 + ⋯ + 2 1 0 2 1 0 ≡ 1 + 1 + ⋯ + 1 ≡ 2 1 0 ≡ − 1 ( m o d 2 1 1 ) Again, c 0 × ( 1 0 + 2 0 + ⋯ + 2 1 0 2 1 0 ) ≡ c 0 × ( 1 + 1 + ⋯ + 1 ) ≡ − c 0 ( m o d 2 1 1 ) Our desired remainder equals − 1 × ( c 0 + c 2 1 0 ) ( m o d 2 1 1 ) An easy check shows that c 0 + c 2 1 0 ≡ 1 4 2 ( m o d 2 1 1 ) . Our desired remainder will then be: − 1 4 2 ( m o d 2 1 1 ) ≡ 6 9 ( m o d 2 1 1 )
Sum of first 210 numbers is divisible by 211. Also the sum of first 210 squares, cubes, 4th powers and so on(including 211th powers and 213th powers) are divisible by 211, except 210th powers which leave a remainder 1 individually when divided by 211 (Fermat's Little Theorem). So the remainder is sum of all the coefficients of the 210th powers i.e. 210x71x2 which is equivalent to 69 modulo 211.
Log in to reply
Can you explain why this is true?
Log in to reply
Frankly no. It is true for sum of first n 1st,2nd and 3rd powers (evident from the formulas), if n+1 is a prime number. And I just extrapolated it to all integer powers. For odd powers it is obvious because the remainders from a^n and (211-a)^n will cancel. But for even powers I am not sure why.
I saw this from Paulo Ribenboim's book, The Little Book of Bigger Primes , page 18:
Let p be any odd prime, k ≥ 1 , and S = ∑ j = 1 p − 1 j k . Then S is congruent to − 1 m o d p when p − 1 ∣ k , and 0 m o d p otherwise.
I used Mathematica:
Mod[Sum[((x - 1)^3 + (x - 1) + 2)^71, {x, 211}], 211]
Log in to reply
PARI for me. Apparently it's extremely fast with number theory computations
It's possible to do this with an Excel bash. Set up a column of the integers 0 to 2 1 0 and the values of x 3 + x + 2 . Take this value m o d 2 1 1 (this is the m o d column; the next 7 1 columns to the right are the m o d n columns). If you make each m o d n column the product of the m o d n − 1 column and the m o d column, taken m o d 2 1 1 , you can get the value for ( x 3 + x + 2 ) 7 1 m o d 2 1 1 for a specific x . Repeating this for x ∈ [ 0 , 2 1 0 ] and setting up a cell to take the sum of the entries in the m o d 7 1 column yields a value of 1 9 , 6 9 2 . 1 9 , 6 9 2 m o d 2 1 1 = 6 9 m o d 2 1 1 , so the answer is 6 9 .
When I did this, I noticed an interesting phenomenon. Each of the values in the m o d 7 0 column was either 0 , 1 , 1 4 , or 1 9 6 . Several other columns had lots of repeated terms too. Can someone please explain why this is? Thanks.
Log in to reply
For your observation regarding ( m o d 7 0 ) , notice that 1 4 3 = 2 7 4 4 ≡ 1 ( m o d 2 1 1 ) , 1, 14 and 196 are the 'cube roots' of 1 modulo 211, i.e. integers which satisfy x 3 ≡ 1 ( m o d 2 1 1 ) .
Because 211 is a prime, the non-zero residues form a cyclic group under multiplication. Since we know from FLT that a 2 1 0 ≡ 1 ( m o d 2 1 1 ) , the values of a 7 0 would only be the 3 cube roots. Apply this to a = x 3 + x + 2 , and the only possible non-zero values are 1 , 1 4 , 1 9 6 . As it turns out, all of them are achievable.
Of course, it could be 0 if x 3 + x + 2 ≡ 0 ( m o d 2 1 1 ) .
def f(x):
return ((x**3) + x + 2)**71
bigSum = 0
i=0
while i < 211:
bigSum = bigSum + f(i)
i=i+1
print "bigSum MOD 211",(bigSum % 211)
wonder how that worked, if you f(x) was already doing the 211, and then you re-did the modulus 211 with the final result.
Log in to reply
I used m o d 2 1 1 in f ( x ) to avoid huge numbers. Since we really care only about residues m o d 2 1 1 it is completelly OK to do this. The programm would theoretically also work if you removed the m o d 2 1 1 part in the function.
Hahaha, I did the same!
Throw this into python.
c=0
for x in range (0, 211):
c+=(((x^3)+x+2)^71)"^ should be **"
print (c%211)
6 9
Problem Loading...
Note Loading...
Set Loading...
This is a simple solution in python