# Tagged Questions

1answer
53 views

### How can I compute the following fast?

What approach should I adopt for computing the following problem fast? $$f(n) = \sum_{i=1}^n (n \mod i)$$ $$1\le n \le 10^{10}$$ Since the answer can be huge I have to output it modulo some given ...
0answers
46 views

0answers
80 views

### Need help simplifying an equation.

I'm trying to speed up the following code: sum = 0 for (k = 1 ... N) { f = Fibonacci(k); for (a = 1 ... 24) for (b = 1 ... 24) for (c = 1 ... 24) { sum = sum + m(a, b, c) // ...
2answers
73 views

### Computing $\left\lfloor\sum_{k = 1}^{n}{\varphi^{3k}}\right\rfloor$

I'm trying to find $\left\lfloor\sum_{k = 1}^{n}{\varphi^{3k}}\right\rfloor$ mod $m$. $\varphi = \frac{1 + \sqrt{5}}{2}$ and $\varphi^3 = 2 + \sqrt{5}$. But honestly I'm not even sure where to start. ...
1answer
534 views

### modulo of series summation

I have trouble with computing modulo. First, I have a summation of series like this: $$1+3^2+3^4+\cdots+3^n$$ And this is the formula which can be used to compute the series: ...