2
votes
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 ...
2
votes
0answers
46 views

Closed form for the sum $\sum_{a=1}^{b} a^3\cdot (b \bmod a)$

How can we simplify $\sum_{a=1}^{b} a^3\cdot (b \mod a)$? For $a \ge \frac{b+1}{2} $ to $a = b$ it reduces to $$\sum_{a\ge \frac{b+1}{2}}^{b}a^3\cdot (b-a)=b\cdot\sum_{a\ge ...
3
votes
1answer
163 views

How to compute this sum?

I want to sum the following: $$f(n) = \sum_{i=1}^n (i^3 \cdot (n \mod i))$$ Since the sum can be huge I have to output the sum modulo some given number m. How can I approach this problem? Also, n ...
0
votes
2answers
36 views

Simplifying modulus expressions and an unknown expression? discrete math

I have a few questions below that I need help with a) I don't really understand what that symbol means and how to solve it b) How do u simplify this without a calculator c) I got 2^-r = 0, iss this ...
1
vote
2answers
43 views

Problem involving summation and binomial coefficient

I have been fighting with this but I'm really not getting anywhere. $$\sum_{0\leq2k\leq n}\binom{n}{2k}2^k\equiv0\pmod 3$$ $$iff$$ $$n\equiv2\pmod 4$$ Hint: Consider ...
1
vote
0answers
30 views

Sigma notation using Modulo

I've come across a step in a proof in a book on number theory that doesn't make sense to me: $$\sum_{n(mod\,p)}\frac{n(n-1)(n+1)}{p}$$ $$=\sum_{n(mod\,p)}\frac{(n+1)(n)(n+2)}{p}$$ As I understand ...
1
vote
1answer
104 views

Sum of a series involving modulus operator

I'm attempting to work out a problem that involves summing a series of numbers. I know the formula to find each element of the series, but I do not know how to use this to make an equation for the ...
0
votes
1answer
47 views

The closed form of a sum of mod(k,m) where k goes from 1 to a arbitrary number.

Is there a closed form for $\sum_{n=0}^{C} mod(n,m)$ for arbitrary integers m ?
0
votes
1answer
55 views

How to maximize $n!\sum^n_{k = 0}\frac{a^k(1+(-1)^{n-k})}{k!(n-k)!} \pmod{a^2}$ for a given $a$?

Short Version of the Question: How do I maximize the value of $n!\sum^n_{k = 0}\frac{a^k(1+(-1)^{n-k})}{k!(n-k)!} \pmod{a^2}$ for a given $a$? Long Version of the Question: I'm currently attempting ...
1
vote
3answers
205 views

How to solve $ \sum_{i=1}^{n-1} i^2 \equiv \;? \pmod n$

I solved expressions below . it is ok? My attempt: $$1)\;\;\;\;\; ?\cong\pmod n\sum_{i=1}^{n-1} i^2 \stackrel{?}= ...
1
vote
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) // ...
0
votes
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. ...
1
vote
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: ...