More fun in 2015, Part 36

Find the sum of all integers k k with 1 k 2015 1\leq k\leq 2015 and gcd ( k , 2015 ) = 1 \gcd(k,2015)=1 .


The answer is 1450800.

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.

5 solutions

Aareyan Manzoor
Dec 17, 2015

the formula for the sum of all co-primes less then n is n ϕ ( n ) 2 \dfrac{n\phi(n)}{2} plug in 2015 to get 2015 2 ϕ ( 5 13 31 ) = 2015 2 ϕ ( 5 ) ϕ ( 13 ) ϕ ( 31 ) = 2015 2 4 12 30 = 1450800. \dfrac{2015}{2}*\phi(5*13*31)=\dfrac{2015}{2}*\phi(5)*\phi(13)*\phi(31)=\dfrac{2015}{2}*4*12*30=1450800. .


proof: note that if k is co-prime to n, so is n-k. let S denote the sum. the number of terms will be the numbers less then equal n which is coprime to it. this is ϕ ( n ) \phi(n) . then: S = k 1 + k 2 + . . . . + k ϕ ( n ) 1 + k ϕ ( n ) S=k_1+k_2+....+k_{\phi(n)-1}+k_{\phi(n)} using the fact stated at the beginning of proof: S = ( n k ϕ ( n ) ) + ( n k ϕ ( n ) 1 ) + . . . . . ( n k 2 ) + ( n k 1 ) S=(n-k_{\phi(n)})+(n-k_{\phi(n)-1})+.....(n-k_2)+(n-k_1) add these up. note that each k will cancel out, and the number of terms is ϕ ( n ) \phi(n) . so 2 S = n ϕ ( n ) S = n ϕ ( n ) 2 2S=n\phi(n)\Longrightarrow\boxed{S=\dfrac{n\phi(n)}{2}} hence proved.

I did it like this :

( 1 + 2 + . . . + 2014 ) 5 ( 1 + 2 + . . . + 402 ) 13 ( 1 + 2 + . . . + 154 ) 31 ( 1 + 2 + . . . + 64 ) + 65 ( 1 + 2 + . . . + 30 ) + 403 ( 1 + 2 + 3 + 4 ) + 155 ( 1 + 2 + . . . + 12 ) (1 + 2 + ... + 2014) - 5(1 + 2 + ... + 402) - 13(1 + 2 + ... + 154) - 31(1 + 2 + ... +64) + 65(1 + 2 + ... +30) + 403(1 + 2 + 3 + 4) + 155(1 + 2 + ... + 12)

Dev Sharma - 5 years, 5 months ago

Log in to reply

it is easy for 2015, try for 2016... a lot of factors there. still works though.

Aareyan Manzoor - 5 years, 5 months ago

Log in to reply

Btw, your solution is awesome...

Dev Sharma - 5 years, 5 months ago

Log in to reply

@Dev Sharma thanks......

Aareyan Manzoor - 5 years, 5 months ago

Log in to reply

@Aareyan Manzoor That formula is helpful. If you know any other of lcm or gcd then share with us..

Dev Sharma - 5 years, 5 months ago

Log in to reply

@Dev Sharma sorry for late response electricity flashed out. i will give it in comment in a few min.

Aareyan Manzoor - 5 years, 5 months ago

Log in to reply

@Aareyan Manzoor or you can share a note

Dev Sharma - 5 years, 5 months ago

Log in to reply

@Dev Sharma or maybe a wiki, i will post soon 'inspired by dev sharma'.

Aareyan Manzoor - 5 years, 5 months ago

Log in to reply

@Aareyan Manzoor let me derive all the formulas....

Aareyan Manzoor - 5 years, 5 months ago

Me too, I also didn't know the formula. Our method is actually good because we didn't use any formula, we just did using fundamentals.

Kushagra Sahni - 5 years, 5 months ago

Log in to reply

yes. And Happy Birthday

Dev Sharma - 5 years, 5 months ago

Happy birthday

Department 8 - 5 years, 5 months ago

Log in to reply

@Department 8 Thnx Bro and Thnx to Dev too

Kushagra Sahni - 5 years, 5 months ago

Yes, exactly (+1)! Nicely done.

Otto Bretscher - 5 years, 5 months ago

Log in to reply

damn I did not saw the sum

Department 8 - 5 years, 5 months ago

can you help me with this problem? (I don't know where to post it...) Show that there is an integer N such that: any integer n bigger or equal to N can be represented as n= a1+a2+a3+a4+...+a73

where a1,a2,a3...a73 are integers, a1 is smaller than a2, a2 than a3, and so on and a1 divides a2, a2 divides a3 and so on.

NOTE: a divides b means b is divisible by a.

I´m sorry, I can´t use latex.

Tomás Carvalho - 5 years, 5 months ago

Log in to reply

@Tomás Carvalho , pot it as a note and then tag me, i 'll try to solve it.

Aareyan Manzoor - 5 years, 5 months ago

Can somebody explain in very easy steps

Eziz Hudaykulyyev - 5 years, 5 months ago

Log in to reply

where are you confused?

Aareyan Manzoor - 5 years, 5 months ago

Log in to reply

K is coprime to n, so is n-k

Eziz Hudaykulyyev - 5 years, 5 months ago

Log in to reply

@Eziz Hudaykulyyev if k is coprime to n, then k n \dfrac{k}{n} is irreducible over integers. now what about n-k: n k n = n n k n = 1 k n \dfrac{n-k}{n}=\dfrac{n}{n}-\dfrac{k}{n}=1-\dfrac{k}{n} since k n \dfrac{k}{n} is irreducible over integers,so is 1 k n 1-\dfrac{k}{n} . and hence n-k is coprime to n _\square

Aareyan Manzoor - 5 years, 5 months ago

Suppose d d divide both n n and n k n-k . Then, d d divide n ( n k ) = k n-(n-k)=k . In the same way, if d d divide both n n and k k , then d d clearly divide n k n-k . So, g c d ( n , k ) = g c d ( n , n k ) gcd(n,k)=gcd(n,n-k) .

Laurent Shorts - 4 years, 4 months ago

Well put except that you forgot to say how you calculated ϕ ( 2015 ) \phi(2015) . For all the reader knows you could have just counted them manually - obviously not the most efficient way of doing it!

Stewart Gordon - 5 years, 5 months ago

Log in to reply

that is true, i have updated my solution...

Aareyan Manzoor - 5 years, 5 months ago

less than*

Richard Leaper - 4 years, 7 months ago

Sorry, I was just thinking , but the sum of all integers from 1 to 2015 must be grather than this results when it s in fact just (2015×(2015+1))/2 = 2031120 ?????

Marwan Talaa - 2 years, 11 months ago

Log in to reply

Indeed, 2'031'120 > 1'450'800.

Laurent Shorts - 2 years, 6 months ago
Stewart Gordon
Dec 19, 2015

For all k k and n n , gcd ( k , n ) = gcd ( n k , n ) \gcd(k, n) = \gcd(n-k, n) . You can see this because any number that divides both k k and n n obviously divides n k n-k ; conversely any number that divides both n k n-k and n n obviously divides k k .

Therefore, the values of k k that satisfy the equation exist in pairs adding to 2015. So we now just need to determine the number of these pairs. This is similar to the way in which Carl Friedrich Gauss is reputed to have discovered the formula for triangular numbers during a school exercise.

To determine the number of these pairs, we look to Euler's totient function. ϕ ( n ) \phi(n) is the number of integers 1 k n 1 \leq k \leq n that are coprime with n n . It is what is known as a multiplicative function, meaning that gcd ( m , n ) = 1 ϕ ( m n ) = ϕ ( m ) ϕ ( n ) . \gcd(m, n) = 1 \Rightarrow \phi(mn) = \phi(m)\phi(n). And of course, if p p is prime, then ϕ ( p ) = p 1 \phi(p) = p - 1 . From this we deduce ϕ ( 2015 ) = ϕ ( 5 13 31 ) = ϕ ( 5 ) ϕ ( 13 ) ϕ ( 31 ) = 4 12 30 = 1440. \phi(2015) = \phi(5 \cdot 13 \cdot 31) \\ = \phi(5) \phi(13) \phi(31)\\ = 4 \cdot 12 \cdot 30\\ = 1440. So 2015 has 1440 smaller coprimes, that is 720 pairs. So the sum of them all is 720 2015 = 1450800 720 \cdot 2015 = \boxed{1450800} .

Very lucid explanation...thank you (+1)! In fairness to the mathematicians of Mesopotamia who knew this result over 3000 years ago, we might remark that Gauss "re-discovered" the formula for triangular numbers during a school exercise.

Otto Bretscher - 5 years, 5 months ago
Arjen Vreugdenhil
Dec 18, 2015

There are ϕ ( 2015 ) = ϕ ( 5 ) ϕ ( 13 ) ϕ ( 31 ) = 4 12 30 = 1440 \phi(2015) = \phi(5)\phi(13)\phi(31) = 4\cdot 12\cdot 30 = 1440 numbers co-prime to 2015. I guessed that they would be evenly distributed, so that on average they are equal to 2015/2. Multiplying gives 1440 2015 2 = 1450800 . 1440\cdot \frac{2015}2 = \boxed{1450800}.

(On second thought, the "guess" is easily justified. The list of gcd ( n , ) \text{gcd}(n,\bullet) from 0 n 0\dots n is symmetric, since gcd ( n , k ) = gcd ( n , n k ) \text{gcd}(n, k) = \text{gcd}(n, n-k) . This justifies taking the average.)

Zee Ell
Dec 18, 2015

Here is a bit longer (but more elementary) solution by using arithmetic sequences (we use the Sn formula multiple times for integers between 1 and 2015, then integers within this interval divisible by 5, 13, 31, 5×13, 5×31, 13×31 and 5×13×31=2015) and the principle of inclusion-exclusion:

1 + 2015 2 × 2015 5 + 2015 2 × 13 × 31 13 + 2015 2 × 5 × 31 31 + 2015 2 × 5 × 13 + 5 × 13 + 2015 2 × 31 + 5 × 31 + 2015 2 × 13 + 13 × 31 + 2015 2 × 5 2015 = 1450800 \frac {1+2015}{2}×2015 - \frac {5+2015}{2}×13×31 - \frac {13+2015}{2}×5×31 - \frac {31+2015}{2}×5×13 + \frac {5×13+2015}{2}×31 + \frac {5×31+2015}{2}×13 + \frac {13×31+2015}{2}×5 - 2015 = \boxed {1450800}

(This could be a way Gauss could have done (or at least would have understood) ... when he was a 5th grader.)

We had sum 1 to 100 in 4th grade for award.One boy solved the same way like Gauss,but he studied law after...

Nikola Djuric - 4 years, 4 months ago

5(1+...+403)+13(1+...+155)+ 31(1+...+65)-65(1+...+31) -155(1+...13)-403(1+...+5)+2015= 5x403x404/2+13x155x156/2+ 31x65x66/2-65x31x32/2 -155x13x14/2-403x5x6/2+2015= 2015(202+78+33-16-7-3+1)= 2015 288 is sum of coprime Sum 1+2+..+2015=2015 2016/2= 2015*1008,so answer is 2015(1008-288)=2015x720= 1450800

Nikola Djuric - 4 years, 4 months ago

On a spreadsheet list the numbers 1 to 2015 in the first column (fill down from 1, 2). Assuming 1 is in cell A1, 2 in cell A2, ... then put =IF(GCD(A1,2015)=1,A1,"") in cell B1 and fill down to cell B2015. Putting =SUM(B1:B2015) in cell B2016 gives 1450800.

Leigh Thompson - 4 years, 3 months ago
Sivasis Dash
Jun 21, 2017

According to the question, k and 2015 are relatively co-prime to each other and how that could be possible is by factorizing 2015 and eliminate all the numbers from the given range which are multiples of 2015's factors i.e 2015=5 13 31 and we have to get all the numbers which are of the form 1k,5k,13k,31k,65k,155k,403k,2015k and subtract their sum from (2015 2016)/2 so the final answer would be (2015 2016)/2-[Sum of elements of the form 5k+Sum of elements of the form 13k+Sum of elements of the form 31k-Sum of elements of the form 65k-Sum of elements of the form 155k-Sum of elements of the form 403k+Sum of elements of the form 2015k] =(2015*2016)/2-{403(5+2015)/2+155(13+2015)/2+65(31+2015)/2-31(65+2015)/2-13(155+2015)/2-5(403+2015)/2+2015} =1450800.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...