Enjoying 2018 while it lasts

What is the smallest positive integer N N such that k = 1 N k 2018 \displaystyle \sum_{k=1}^{N}k^{2018} is divisible by 2018?

Enter 0 if you come to the conclusion that no such N N exists.


The answer is 504.

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.

6 solutions

Otto Bretscher
Oct 22, 2018

Since 1009 is prime, Fermat tells us that k 1009 k ( m o d 1009 ) k^{1009}\equiv k \pmod{1009} for all k k . Squaring gives k 2018 k 2 ( m o d 1009 ) k^{2018}\equiv k^2 \pmod{1009} . This congruence holds m o d 2018 \bmod{2018} as well since k 2018 k^{2018} and k 2 k^2 have the same parity. We are asked to find the smallest positive integer N N such that k = 1 N k 2 \sum_{k=1}^{N}k^2 is divisible by 2018. Now k = 1 N k 2 = N ( N + 1 ) ( 2 N + 1 ) 6 \sum_{k=1}^{N}k^2=\frac{N(N+1)(2N+1)}{6} . The smallest N N such that this sum is divisible by 1009 is N = 504 N=504 , when 2 N + 1 = 1009 2N+1=1009 . We check that k = 1 504 k 2 = 504 × 505 × 1009 6 \sum_{k=1}^{504}k^2=\frac{504\times 505 \times1009}{6} is even, so that the answer is N = 504 N=\boxed{504} .

Nice question! This is exactly how I've solved it.

We can also conclude that

For M = 2 p M = 2p for prime p > 3 p>3 , then the smallest positive integer N N such that k = 1 N k M \sum_{k=1}^{N}k^{M} is divisible by M M is either equal to p , ϕ ( p ) p, \phi(p) or 1 2 ϕ ( p ) \frac12 \phi(p) .

I don't think we can solve it this way if the numbers 2018 were replaced by something more sinister, like say 11 × 13 × 17 = 2431 11\times13\times17=2431 . Right? That is,

Find the smallest positive integer N N such that k = 1 N k 2431 \sum_{k=1}^{N}k^{2431} is divisible by 2431. Enter 666 if you come to the conclusion that no such N N exists.

I think we need to use order of an element , but I'm not quite sure. Thoughts?

Pi Han Goh - 2 years, 7 months ago

Log in to reply

It is great to hear from you, Comrade! You are raising some great questions, but I'm afraid I'm currently too busy with work (and life) to get too deeply into this. Brilliant can be so tempting! Next year, when I plan to retire, I will have a lot more time, and you will see more of me on Brilliant.

Otto Bretscher - 2 years, 7 months ago

U can use eulers Theorem

Anmol Arichwal - 2 years, 7 months ago

Log in to reply

Show us how!

Otto Bretscher - 2 years, 7 months ago

Log in to reply

Lol the Fermat theorem you have used is a special case of Euler theorem

Anmol Arichwal - 2 years, 6 months ago

Log in to reply

@Anmol Arichwal I will never object to the use of my country man's name, although it may be somewhat gratuitous here.

Otto Bretscher - 2 years, 6 months ago

A^(phi(n))=1 mod n

Anmol Arichwal - 2 years, 6 months ago

Great solution!!!

Mr. India - 2 years, 7 months ago
K T
Oct 29, 2018

Since the prime factorization of 2018 is 2×1009, we can see that x 2018 = ( x 1009 ) 2 x 2 x^{2018} = (x^{1009})^2 ≡ x^2 (mod 2018), so N is also the smallest positive integer N such that k = 1 N k 2 \sum_{k=1}^N{k^2} is divisible by 2018. This sum is equal to N ( N + 1 ) ( 2 N + 1 ) 6 \frac{N(N+1)(2N+1)}{6} . In order for that to be divisible by 2018 it needs to contain a factor 1009, which can either be a factor of N, of N+1 or of 2N+1. The smallest possibilty is 2N+1=1009 => N= 504. We try it out: 2 × 50 4 3 + 3 × 50 4 2 + 504 6 = 21210 × 2018 \frac{2×504^3+ 3×504^2+ 504}{6}=21210×2018 , showing that this is a successful try, N=504 \fbox{N=504} .

Antoine Crbs
Nov 3, 2018

By using python we obtain as output 504 \boxed{504} .

1
2
3
4
5
a,s = 1,1
while s%2018!=0:
    a+=1
    s+=a**2018
print a

Giorgos K.
Oct 29, 2018

Using M a t h e m a t i c a Mathematica

n = 1; While[Mod[Sum[k^2018, {k, n++}], 2018] != 0]; n - 1

returns 504

Anmol Arichwal
Oct 29, 2018

Use the eulers theorem

A^(phi{n})=1 mod n ... So Phi (2018)=1008... So A^1008=1mod 2018... Squaring the congruence... A^2016=1 mod 2018... Or A^2018=A^2 mod 2018... So the sequence is divisible by 2018 iff ... 1^2 +2^2...........N^2= 0 mod 2018..

So [N][N+1][2N+1]/6 is=0 mod 2018...

As largest prime factor of 2018 is 1009.. Let 2N+1=1009..

Or N=504... Note::phi stands for the eulers totient function

You have to be careful when applying Euler's Theorem: in our case, it only works when gcd ( A , 2018 ) = 1 \gcd(A,2018)=1 , not for even numbers and not for A = 1009 A=1009 . Although I'm fond of the work of my country man, Fermat works out better here.

Otto Bretscher - 2 years, 7 months ago
Vinod Kumar
Oct 29, 2018

Tried WolframAlpha script:

"Sum (x^2018 from x=0 to N) mod 2018"

for

N= 1009 (Answer=1009),

N=1008 (Answer=0),

and

N= 1008/2=504 (Answer=0),

Therefore,

Answer=504

You have not demonstrated that any positive integer less than 504 also yields a value of 0.

Pi Han Goh - 2 years, 7 months ago

Log in to reply

I didn't get success with 503 or 504/2.

So, I used 504 as one of three tries and it was accepted as correct.,😂.

Vinod Kumar - 2 years, 7 months ago

Log in to reply

So how can you justify that 504 is indeed the correct answer?

Pi Han Goh - 2 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...