2
$\begingroup$

These were two of 20 problems I had to do in a test today that I didn't manage to solve.

1) Find the least $k$ such that $1^2 + 2^2 + 3^2 + 4^2 + \dots + k^2$ is a multiple of 200.

2) Find $f(97)$, where $f(n) = \lfloor 2 \sqrt{1 \cdot 2 \cdot 3 + 4 \cdot 5 \cdot 6 + \dots + n(n+1)(n+2)} \rfloor$.

For the first one, I know that:
$\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}$

so we have: $\displaystyle\frac{k(k+1)(2k+1)}{6} = 200a$ for some integer $a$. So: $\displaystyle\frac{k(k+1)(2k+1)}{1200} = a$. And then I don't know how to go on...

As for the second one, I don't even know where to start...
We had to do all the problems with pen&paper only (no calculator allowed). Using Python I found that the answer to the first question is 112, but how to reach it?

Thank you,
rubik

  • 0
    @pedja Your formula can be factored as $\frac{n(n+2)(n+3)(n+5)}{12}$2012-01-30

1 Answers 1

1

The smallest value for which $n(n+1)(2n+1)/6$ is divisible by 200 is $n = 112$. In this case, the sum is $ 112*113*225 = 8*14*113*9*25 = 200*14238.$ Note that $n=200$ fails.

Now let's look at the second problem. We have $\sum_{k=1}^n k(k+1)(k+2) = 6 \sum_{k=1}^n {k + 2\choose 3} = 6{n + 3\choose 4} = {n(n + 1)(n+2)(n+3)\over 4}.$ Hence $f(97) = \lfloor \sqrt{97*98*99*100}\rfloor$ = 9700. This calculation is razor close; floating point error could have thrown it off.

  • 0
    Very cool, rubik!2012-02-03