An algebra puzzle

Algebra Level 5

How many positive integers n < 2017 n <2017 are such that n 1 n + 2 n + 3 n + + ( n 1 ) n + n n ? n \mid 1^n+2^n+3^n+\cdots +(n-1)^n+n^n?


The answer is 1008.

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.

1 solution

Áron Bán-Szabó
May 13, 2017

n n is odd or even.

If it's odd, then ( n 1 ) / 2 (n-1)/2 is an integer. It's easy to see that for every 0 < k < ( n 1 ) / 2 + 1 0<k<(n-1)/2+1 integer n k n + ( n k ) n n|k^n+(n-k)^n . (Because ( k ) n = k n (-k)^n=-k^n .) We know that n n n n|n^n , so n 1 n + ( n 1 ) n + 2 n + ( n 2 ) n + . . . = 1 n + 2 n + . . . + ( n 1 ) n . n|1^n+(n-1)^n+2^n+(n-2)^n+...=1^n+2^n+...+(n-1)^n.

If n is even, then let x x be the biggest integer such that 2 x 2^x is a divisor of n n . Since 2 x > x 2^x>x , if k k is an even positive integer then 2 x k n 2^x|k^n , if k k is odd then from Euler's theorem, we get k 2 x 1 1 k^{2^x-1}\equiv 1 ( m o d 2 x ) , (\mod 2^x), so k n 1 k^n \equiv 1 ( m o d 2 x ) (\mod 2^x) . Now we get 1 n + 3 n + 5 n + . . . + ( n 1 ) n ( n / 2 ) 1^n+3^n+5^n+...+(n-1)^n \equiv (n/2) ( m o d 2 x ) (\mod 2^x) . From 2 n + 4 n + . . . + ( n 2 ) n 0 2^n+4^n+...+(n-2)^n \equiv 0 ( m o d 2 x ) , 1 n + 2 n + 3 n + . . . + ( n 1 ) n ( n / 2 ) (\mod 2^x), 1^n+2^n+3^n+...+(n-1)^n \equiv (n/2) ( m o d 2 x ) (\mod 2^x) . But if n 1 n + 2 n + 3 n + . . . + ( n 1 ) n n|1^n+2^n+3^n+...+(n-1)^n then 2 x ( n / 2 ) 2^x|(n/2) and 2 x + 1 n 2^{x+1}|n , which is not possible.

So the only solutions are the odd postive integers. The number of odd positive integers under 2017 2017 is 1008 1008 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...