# Sum of prime divisors of ($\sum_{x=0}^{1008}{(2x+1)(2017-2x)}+1009\times 2009$)

$$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\i}{\mathrm{i}} \newcommand{\text}[1]{\mathrm{#1}} \newcommand{\root}[2][]{^{#2}\sqrt[#1]} \newcommand{\derivative}[3]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\abs}[1]{\left\vert\,{#1}\,\right\vert}\newcommand{\x}[0]{\times}\newcommand{\summ}[3]{\sum^{#2}_{#1}#3}\newcommand{\s}[0]{\space}A= 1\x2017 + 3\x2015 + 5\x2013...2013\x5+2015\x3+2017\x1=\summ{x=0}{1008}{(2x+1)(2017-2x)}$$

$$B = \text{Sum\s of\s prime\s divisors \s of \s (A+ 1009\x2019)}$$

What is the value of $$B$$?

What have I tried? I found its midpoint, $$(1009,1009)$$ for $$x=504$$. Then found that the series equals $$[2\summ{x=0}{503}{(2x+1)(2017-2x)}]+1009\x1009$$, adding the $$1009\x2019$$ makes it equal to $$[2\summ{x=0}{503}{(2x+1)(2017-2x)}]+1009\x3028$$ but I'm stuck at this point.

• You can work out $A$ by using $\sum_{x=0}^Nx=N(N+1)/2$ and $\sum_{x=0}^Nx^2=N(N+1)(2N+1)/6$. That would seem to be a good start. Jun 29, 2017 at 15:30
• I'm not sure how to use them in this situation. Jun 29, 2017 at 15:40
• The sum is 1454 Jun 29, 2017 at 15:59
• @Raffaele Yes, it is. How did you calculate it? Jun 29, 2017 at 15:59
• Multiply out the summand and split the sum into 3 pieces. Then apply Lord Shark's suggestion. This seems a little brute force-y, but it's completely doable by hand. Jun 29, 2017 at 16:00

It actually works out neatly (I guess since it's a contest problem.) It's better to re-index. I get:

$$B= \left( \sum_{n=1}^{1009} (2n-1)(2019-2n)\right) +1009(2019)$$

$$=\left( \sum_{n=1}^{1009} -4n^2+(2020)(2n)-2019\right) +1009(2019)$$

$$=-4\frac{1009\cdot 1010\cdot 2019}{6} + 2(2020)\frac{1009\cdot 1010}{2}-1009\cdot 2019 +1009(2019).$$

The last two terms cancel and $1009$ and $1010$ factor out:

$$=1010\cdot 1009 \left(-\frac{2}{3}2019 +2020\right)=2\cdot 5 \cdot 101\cdot1009\cdot 647$$

$$= 2^2 5\cdot 101 \cdot 337 \cdot 1009.$$

The sum of those primes is $1456.$

• Sorry but the answer is 1454. Jun 29, 2017 at 16:32
• It depends on if you count the $2$ twice. I did, perhaps the poser did not. Jun 29, 2017 at 16:33
• $B$ is the sum of the prime divisors of $A+1009\cdot 2019$, as clearly stated in the problem. This approach is slick, but not for the problem posed. Jun 30, 2017 at 21:50
• @Harry You're unaware that problems get edited, I take it. Jun 30, 2017 at 22:27
• I misunderstood the way you treated the problem, since you and the OP defined $B$ in different ways. I see now that you answered the OP's question just fine. Sorry for the misunderstanding! Jun 30, 2017 at 22:33