1
$\begingroup$

Let $m$ be the number of numbers from set $\{1,2,3,\dots,2014\}$ which can be expressed as difference of the squares of two non negative integers. The sum of digits of $m$ is...

My attempt: I tried one by one that $1,2,4,5,6,7$ and so on. But it was very long and still I didn't got the right answer. Can anyone help me to solve this problem?

$\endgroup$
1
$\begingroup$

Hint: $x^2 - y^2 = (x+y)(x-y)$. $x+y$ and $x-y$ can be any integers that are either both odd or both even. So the only positive integers that can't be written in this way are ...

$\endgroup$
  • 1
    $\begingroup$ You mean to say that I should try this method for 1 to 2014. $\endgroup$ – Murtuza Vadharia Dec 21 '14 at 9:16
  • $\begingroup$ check for 1 then 2 then 3 and so on $\endgroup$ – Murtuza Vadharia Dec 21 '14 at 9:16
  • 1
    $\begingroup$ suppose I use this method and try for 64 then only possible values x-y and x+y would be factor of 64 then it would be 1×64,2×32,4×16,8×8,16×4,32×2,64×1. $\endgroup$ – Murtuza Vadharia Dec 21 '14 at 9:17
  • 1
    $\begingroup$ for 64 only I will have to check 7 times and there are 2014 numbers to check. $\endgroup$ – Murtuza Vadharia Dec 21 '14 at 9:21
  • 1
    $\begingroup$ @Henrik this you have tried for only 64 and you are unsure we have to check 2014 numbers $\endgroup$ – Murtuza Vadharia Dec 21 '14 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.