Find the sum of all (possibly negative) integers n such that
n 2 + 2 ∣ 2 0 1 4 n + 2 .
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.
Nice Solution and nice question @Finn Hulse :)
Once you start learning programming (and that too by self study), it does addict you, this is the way I used to solve the problem
Sum of all of them is 2 0 1 3
truly the unappreciated way, but that gave a practice of programming....
i want a mathematical solution not a CS program for this question
Can you justify that n must be within that range?
Restricting the range of n is a good way to approach this question.
Log in to reply
It's easy to see from the question that n 2 + 2 ≤ ∣ 2 0 1 4 n + 2 ∣ , thus we get that for positive or 0 value of n , n 2 ≤ 2 0 1 4 n , and so for negative, It will be n 2 + 2 ≤ − 2 0 1 4 n − 2 , a quadratic n 2 + 2 0 1 4 n + 4 ≤ 0
so the range is reduced. But as i had an idea of this range,to reduce those many calculations, I directly kept a big range, no matter, because the needed range is surely going to be in that :P
Log in to reply
It is not true for n=3, if n=2015 how can n 2 +2 <=|2014n+2|?
Log in to reply
@Shuvayan Ghosh Dastidar – Please! Bigger positives don't divide smaller numbers' absolute value ! WE ARE GIVEN n 2 + 2 ∣ 2 0 1 4 n + 2 and that does mean that n 2 + 2 ≤ 2 0 1 4 n + 2
Nice! I really love CS approaches, I'm an admirer of anybody who can program. :D
Log in to reply
Is there a non-programming method?
Log in to reply
Of course dude.
Log in to reply
@Finn Hulse – I also added a note that n may be negative because I usually don't see negative numbers with the ∣ sign.
I'm too lazy to add those integers. I too solved using Python. My code and output follows:
1 2 3 4 5 6 7 8 9 10 11 |
|
So answer is 2013
Define p ( n ) : = n 2 + 2 and q ( n ) : = 2 0 1 4 n + 2 . Use Euclid's Algorithm to get possible common divisors: 2 ⋅ 1 0 0 7 2 p ( n ) − ( 1 0 0 7 n − 1 ) q ( n ) = 4 ⋅ 1 0 0 7 2 + 2 = 2 ⋅ 3 ⋅ 7 8 7 ⋅ 8 5 9 = : N ( ∗ ) Let's apply " m o d p ( n ) " on both sides of ( ∗ ) . We know p ( n ) divides q ( n ) , so the left part vanishes: N = 2 ⋅ 1 0 0 7 2 p ( n ) − ( 1 0 0 7 n − 1 ) ≡ 0 m o d p ( n ) ⇒ p ( n ) divides N Notice p ( n ) ≥ 2 must be a positive factor of N - checking all 1 6 of them we only find integer solutions for p ( n ) n 2 0 3 ± 1 6 ± 2 N ± 2 0 1 4 Find those n that also satisfy " q ( n ) ≡ 0 m o d p ( n ) ": n q ( n ) m o d p ( n ) 0 0 1 0 − 1 1 2 4 − 2 0 3 5 − 3 1 0 6 2 − 6 2 2 0 1 4 0 − 2 0 1 4 4 We have n ∈ { 0 ; 1 ; − 2 ; 2 0 1 4 } , and the answer is 0 + 1 − 2 + 2 0 1 4 = 2 0 1 3
Problem Loading...
Note Loading...
Set Loading...
n^2+2 | (2014n+2)(2014n-2) then we get n^2+2 | 2*2014^2+4 but we know that 4 does not divide n^2+2 therefore n^2+2 | 2014^2+2. Now find the factors of 2014^2+2. Observe that the solutions of n obtained are such that n^2+2 | 2014n+2 or n^2+2 | 2014n-2 . So check validity of solutions. 0, 1, -2 and 2014 are the solutions.