Prove or disprove that $ \sum\limits_{k = 1 }^T f(k)=0 $ where $f(m)=\sum\limits_{n = 1 }^ m (-1)^n \sin(\frac{n(n+1)(2n+1)}{6}x) $
$$f(m)=\sum\limits_{n = 1 }^ m (-1)^n \sin\left(\frac{n(n+1)(2n+1)}{6} \frac{a \pi}{b}\right) \tag 1 $$
Where $a,b,m$ positive integers.
I have tested in WolframAlpha for many $a$ and $b$ values.
I conjecture (1) without proof that $f(m)$ function is periodic when $a,b,m$ positive integers and the sum of $f(m)$ is $0$ between period.
Edit: In other way to express my claim above in my conjecture ($1$) that $ \sum\limits_{k = 1 }^T f(k)=0 $ where ($T$) is the period value.
The wolframalpha link for testing some $a,b$ values
I also conjecture (2) without proof that the sum of $f(m)$ should be zero if $x$ is any real number.
$$f(m)=\sum\limits_{n = 1 }^ m (-1)^n \sin\left(\frac{n(n+1)(2n+1)}{6}x\right) \tag 2 $$
$$ \lim\limits_{n \to \infty}\sum\limits_{k = 1 }^ n f(k)=0 \tag 3 $$
What is the period formula when $a,b$ are positive integers?
Please help me to prove my conjectures 1 and 2 or disprove .
Note that:$$\sum\limits_{k = 1 }^ n k^2= \frac{n(n+1)(2n+1)}{6} $$
EDIT:
The period value is ($T$) and $f(m)$ satisfies $f(m)=f(m+kT)$ relation where $k$ is non-negative integer.
Period values for some $a,b$ values:
$a=3$, $b=17$ ,$x=\frac{3 \pi}{17} \Rightarrow T=68$ (this example is given in the link) and $ \sum\limits_{k = 1 }^{68} f(k)=0 $
$a=1$, $b=2$ ,$x=\frac{ \pi}{2} \Rightarrow T=8$ and $ \sum\limits_{k = 1 }^8 f(k)=0 $
$a=1$, $b=3$ ,$x=\frac{ \pi}{3} \Rightarrow T=36$ and $ \sum\limits_{k = 1 }^{36} f(k)=0 $
$a=1$, $b=4$ ,$x=\frac{ \pi}{4} \Rightarrow T=16$ and $ \sum\limits_{k = 1 }^{16} f(k)=0 $
$a=1$, $b=5$ ,$x=\frac{ \pi}{5} \Rightarrow T=20$ and $ \sum\limits_{k = 1 }^{20} f(k)=0 $
$a=1$, $b=6$ ,$x=\frac{ \pi}{6} \Rightarrow T=72$ and $ \sum\limits_{k = 1 }^{72} f(k)=0 $
$a=1$, $b=7$ ,$x=\frac{ \pi}{7} \Rightarrow T=28$ and $ \sum\limits_{k = 1 }^{28} f(k)=0 $
$a=2$, $b=7$ ,$x=\frac{ 2\pi}{7} \Rightarrow T=14$ and $ \sum\limits_{k = 1 }^{14} f(k)=0 $
$a=3$, $b=7$ ,$x=\frac{ 3\pi}{7} \Rightarrow T=56$ and $ \sum\limits_{k = 1 }^{56} f(k)=0 $
$a=4$, $b=7$ ,$x=\frac{ 4\pi}{7} \Rightarrow T=14$ and $ \sum\limits_{k = 1 }^{14} f(k)=0 $
$a=5$, $b=7$ ,$x=\frac{ 5\pi}{7} \Rightarrow T=28$ and $ \sum\limits_{k = 1 }^{28} f(k)=0 $
Thanks a lot for answers.
Please note that: I have posted a new question to generalize the problem. the link to the question
Solution 1:
Your conjecture 1 is true and it is stated and proved as follows. On other hand, conjecture 2 is false and it is disproved below.
Let $a,b$ be two coprime and positive integers. Then the function $f$ defined for $m\in\Bbb N$ $$f(m)=\sum_{n=0}^m(-1)^n\sin\left(\frac{n(n+1)(2n+1)}6\frac{a\pi}b\right)$$ has period $$T=\frac{4\gcd(b,3)b}{\gcd(a,2)}$$ and $$\sum_{m=0}^{T-1}f(m)=0$$
The proof is split in several steps.
Lemma 1. $$\sin(ax\pi/b)=(-1)^h\sin(ay\pi/b)\iff ax\equiv kb+(-1)^{k+h}ay\pmod{2b}$$
Proof. We have $\sin(ax\pi/b)=(-1)^h\sin(ay\pi/b)$ if and only if \begin{align} &ax\pi/b\equiv(-1)^hay\pi/b\pmod{2\pi}& &\lor& &ax\pi/b\equiv\pi-(-1)^hay\pi/b\pmod{2\pi} \end{align} that's \begin{align} &ax\equiv(-1)^hay\pmod{2b}& &\lor& &ax\equiv b-(-1)^hay\pmod{2b} \end{align} which is equivalent to $ax\equiv kb+(-1)^{k+h}ay\pmod{2b}$.
Lemma 2. Let $t_n$ for $n\in\Bbb N$ be an integer sequence and let for all $m\in\Bbb N$ $$f(m)=\sum_{n=0}^m\sin\left(t_n \frac{a\pi}b\right).$$ Then
If $at_{T-1-n}\equiv kb-(-1)^kat_n\pmod{2b}$ then $f(T-1)=0$.
If $at_{T+n}\equiv kb+(-1)^{k+h}at_n\pmod{2b}$, then $f(T+m)=f(T-1)+(-1)^hf(m)$.
If $f(T+m)=-f(m)$ then $f$ has period $2T$ and $\sum_{m=0}^{2T-1}f(m)=0$.
Proof of 1. By Lemma 1 we have $\sin(at_{T-1-n}\pi/b)=-\sin(at_n\pi/b)$ hence \begin{align} f(T-1) &=\sum_{n=0}^{T-1}\sin(at_n\pi/b)\\ &=\sum_{n=0}^{T-1}\sin\left(t_{T-1-n}\frac{a\pi}b\right)\\ &=-\sum_{n=0}^{T-1}\sin\left(t_n\frac{a\pi}b\right)\\ &=-f(T-1) \end{align} hence $f(T-1)=0$.
Proof of 2. We have \begin{align} f(T+m) &=f(T-1)+\sum_{n=T}^{T+m}\sin(at_n\pi/b)\\ &=f(T-1)+\sum_{n=0}^m\sin(at_{T+n}\pi/b)\\ &=f(T-1)+(-1)^h\sum_{n=0}^m\sin(at_n\pi/b)\\ &=f(T-1)+(-1)^hf(m) \end{align}
Proof of 3. We have $f(2T+m)=-f(T+m)=f(m)$, hence $f$ has period $2T$ and \begin{align} \sum_{m=0}^{2T-1}f(m) &=\sum_{m=0}^{T-1}f(m)+\sum_{m=T}^{2T-1}f(m)\\ &=\sum_{m=0}^{T-1}f(m)+\sum_{m=0}^{T-1}f(T+m)\\ &=\sum_{m=0}^{T-1}f(m)-\sum_{m=0}^{T-1}f(m)\\ &=0 \end{align} from which the assertion follows.
Lemma 3. Let for all $n\geq 0$ \begin{align} &s_n=\sum_{k=0}^nk^2,& &t_n=(-1)^ns_n, \end{align} The for all $n\in\Bbb N$ the following congruences holds: \begin{align} t_{b+n}&\equiv(-1)^nt_b+(-1)^bt_n\pmod b\\ t_{b-1-n}&\equiv(-1)^nt_{b-1}+(-1)^bt_n\pmod b \end{align}
Proof. We have \begin{align} s_{b+n}& =\sum_{k=0}^{b+n}k^2& s_{b-1-n}& =\sum_{k=0}^{b-1-n}k^2\\ & =\sum_{k=0}^bk^2+\sum_{k=b+1}^{b+n}k^2& & =\sum_{k=0}^{b-1}k^2-\sum_{k=b-n}^{b-1}k^2\\ & =s_b+\sum_{h=1}^n(b+h)^2& & =\sum_{k=0}^{b-1}k^2-\sum_{h=1}^n(b-h)^2\\ & \equiv s_b+\sum_{h=1}^nh^2& & \equiv s_{b-1}-\sum_{h=1}^nh^2\\ & =s_b+s_n\pmod b& & \equiv s_{b-1}-s_n\pmod b \end{align} hence \begin{align} t_{b+n}& =(-1)^{b+n}s_{b+n}& t_{b-1-n}& =(-1)^{b-1-n}s_{b-1-n}\\ & \equiv(-1)^{b+n}s_b+(-1)^{b+n}s_n& & \equiv (-1)^{b-1-n}s_{b-1}-(-1)^{b-1-n}s_n\\ & =(-1)^nt_b+(-1)^bt_n\pmod b& & =(-1)^nt_{b-1}+(-1)^bt_n\pmod b \end{align}
Now the proof of main statement.
If $2\nmid a$, then $f$ has period $T=4\gcd(b,3)b$ and $\sum_{m=0}^{T-1}f(m)=0$.
Let $d=\gcd(b,3)$. From Lemma 3 \begin{align} t_{2db+n}&\equiv(-1)^nt_{2db}+t_n\pmod{2db}\\ t_{2db-1-n}&\equiv(-1)^nt_{2db-1}+t_n\pmod{2db} \end{align} Moreover, \begin{align} (-1)^nat_{2db}& =(-1)^na\frac{2db(2db+1)(4db+1)}6& t_{2db-1}& =-(-1)^na\frac{(2db-1)2db(4db-1)}6\\ & =(-1)^na\frac d3(2db+1)(4db+1)b& & =-(-1)^na\frac d3(2db-1)(4db-1)b\\ & \equiv b\pmod{2b}& & \equiv b\pmod{2b} \end{align} Consequently, \begin{align} at_{2db+n}&\equiv b+at_n\pmod{2b}\\ at_{2db-1-n}&\equiv b+at_n\pmod{2b} \end{align} hence, by Lemma 2.1, $f(2db-1)=0$, by Lemma 2.2 $f(2db+m)=-f(m)$. By Lemma 2.3, $f$ has period $4db$ and $$\sum_{m=0}^{4db-1}f(m)=0$$
If $2\mid a$, then $f$ has period $T=2\gcd(b,3)b$ and $\sum_{m=0}^{T-1}f(m)=0$.
Since $a,b$ are, by assumption, coprime, we have $2\nmid b$. Let $d=\gcd(b,3)$. From Lemma 3 we get \begin{align} t_{db+n}&\equiv(-1)^nt_{db}-t_n\pmod{db}\\ t_{db-1-n}&\equiv(-1)^nt_{db-1}-t_n\pmod{db} \end{align} Moreover, \begin{align} (-1)^nat_{db}& =(-1)^na\frac{db(db+1)(2db+1)}6& t_{db-1}& =-(-1)^na\frac{(db-1)db(2db-1)}6\\ & =(-1)^n\frac a2\frac d3\frac{db+1}2(2db+1)2b& & =-(-1)^n\frac a2\frac d3\frac{db-1}2(2db-1)2b\\ & \equiv 0\pmod{2b}& & \equiv 0\pmod{2b} \end{align} so that \begin{align} at_{db+n}&\equiv-at_n\pmod{2b}\\ at_{db-1-n}&\equiv-at_n\pmod{2b} \end{align} By Lemma 2.1 we have $f(db-1)=0$, while by Lemma 2.2 we get $f(db+m)=-f(m)$. Finally, by Lemma 2.3, $f$ has period $2db$ and $$\sum_{m=0}^{2db-1}f(m)=0$$
Conjecture 2 is false. For let $q$ be a non-zero polynomial with rational coefficients, $x$ be a real number and assume \begin{align} & \sum_{m=0}^\infty f(m)=0& \text{where }& f(m)=\sum_{n=0}^m(-1)^n\sin(q(n)x) \end{align} If $f(m)\xrightarrow{m\to\infty}0$ then $$\sum_{n=0}^\infty(-1)^n\sin(q(n)x)=0$$ hence $\sin(q(n)x)\xrightarrow{n\to\infty}0$. Consequently $e^{2ixq(n)}\xrightarrow{n\to\infty}1$, hence $x\in\pi\Bbb Q$ by the Lemma 4 below.
Lemma 4. Let $p$ be a non-zero polynomial with coefficients in $\Bbb Q$ and $x$ be a real number. If $e^{ixp(n)}\xrightarrow{\Bbb N\ni n\to\infty}1$, then $x\in\pi\Bbb Q$.
Proof. By induction on $\deg p$. If $\deg p=0$, then $e^{iax}=1$ for some $a\in\Bbb Q$ ($a\neq 0$). This implies $ax\in 2\pi\Bbb Z$, hence $x\in\pi\Bbb Q$.
If $\deg p>0$, then $q(n)=p(n)-p(n-1)$ is a non-zero polynomial with $\deg q<\deg p$ and $$e^{ixq(n)}=\frac{e^{ixp(n)}}{e^{ixp(n-1)}}\xrightarrow{n\to\infty}1$$ hence $x\in\pi\Bbb Q$ by induction hypothesys.
Solution 2:
1. Settings and main results
Let $a$ and $b$ be relatively prime integers. Let $\theta, e, F $ be defined by
\begin{align*} \theta_n = \frac{a}{b}\left(\sum_{k=1}^{n} k^2 \right) + n, \qquad e_n = \exp\{i\pi\theta_n\}, \qquad F_m = \sum_{n=1}^{m} e_n. \end{align*}
(Here, we extend $\sum$ by additivity to allow non-positive arguments for $\theta$ and $F$.) This definition is related to OP's question by $f(m) = \operatorname{Im}\left( F_m \right)$. In view of this, we will prove the following result.
Proposition. The smallest positive period $T_{\min}$ of $\{e_n\}$ is given by $$ T_{\min} = \frac{4\gcd(b, 3)}{\gcd(a, 2)}b. \tag{1} $$ Moreover, $F$ has period $T_{\min}$ and satisfies $$ \operatorname{Im} \left( \sum_{m=1}^{T_{\min}} F_m \right) = 0. $$
To establish this result, we aim to prove the following lemmas.
Lemma 1. An integer $T$ is a period of $\{e_n\}$ if and only if the following conditions hold $ $
- $\text{(P1)} \ $ $T = 2bp$ for some integer $p$, and
- $\text{(P2)} \ $ $2 \mid ap$ and $3 \mid ap(2bp+1)(4bp+1)$.
Lemma 2. Let $T$ be a period of $\{e_n\}$ and write $U = \frac{T}{2}$. Then
- $e_{n+U} = e_U e_n$ and $e_{U-1-n} = -e_U \overline{e_n}$.
- $e_U = \pm 1$ and $e_{U-1} = -e_U$.
- If $e_U = 1$, then $U$ is also a period of $\{e_n\}$.
Let us see how this leads to the desired main result.
Proof of Proposition using Lemmas. It is easy to check that $\text{(1)}$ is the smallest positive $T$ satisfying both $\text{(P1)}$ and $\text{(P2)}$. Writing $U = T_{\min}/2$ for simplicity, it follows from the minimality of $T_{\min}$ and Lemma 2 that $U$ is not a period of $\{e_n\}$. In particular, we have $e_U = -1$. Then
$$ F_{T_{\min}} = \sum_{n=1}^{U} (e_n + e_{U+n}) = \sum_{n=1}^{U} (e_n - e_n) = 0. $$
Moreover, since $e_{U-1} + e_U = 0$ and $e_{-1} + e_0 = 0$, we have
$$ F_U = \sum_{n=-1}^{U-2} e_n = \sum_{n=1}^{U} e_{U-1-n} = \sum_{n=1}^{U} \overline{e_n} = \overline{F_U}. $$
This implies that $\operatorname{Im}(F_U) = 0$. Finally, it follows that
$$ \sum_{m=1}^{T} F_m = \sum_{m=1}^{U} (F_m + F_{U+m}) = \sum_{m=1}^{U} (F_m + F_U - F_m) = UF_U $$
and therefore $ \operatorname{Im}\left(\sum_{m=1}^{T} F_m \right) = 0$ as required.
2. Proofs of lemmas
Before proving these claims, we introduce an auxlilary quantity which will be useful throughout the solution. Set
$$ \Delta_{m,n} = \theta_{m+n} - \theta_m - \theta_n = \frac{a}{b}mn(m+n+1). $$
It is obvious that $e_{m+n} = e_m e_n \exp\{i\pi\Delta_{m,n}\}$ holds for any $m, n$. In particular, this implies that
$$ \text{$T$ is a period of $\{e_n\}$} \quad \Leftrightarrow \quad \begin{cases} \theta_T \equiv 0 \pmod{2}, \\ \Delta_{T,n} \equiv 0 \pmod{2} \ \forall n \in \mathbb{Z} \end{cases} \tag{2}$$
Now we proceed to prove Lemma 1 first.
Proof of Lemma 1. One direction is almost immediate. Indeed, assume that both $\text{(P1)}$ and $\text{(P2)}$ hold. Then we easily check that both $\Delta_{n,T}$ and $\theta_T$ are even integers, hence $T$ is a period in view of $\text{(2)}$. So we focus on proving the other direction.
Assume that $T$ is a period of $\{e_n\}$. Using $\text{(2)}$, we know that both
$$ \Delta_{T,2} - 2\Delta_{T,1} = \frac{2aT}{b} \quad \text{and} \quad \Delta_{T,2} - 3\Delta_{T,1} = -\frac{aT^2}{b} $$
are all even integers. Since $a$ and $b$ are relatively prime, the first identity implies that $q = T/b$ is an integer and hence the same is true for $S = qa = aT/b$. Then the second identity tells that $2 \mid ST$. Now let us expand $\theta_T$ as
$$ \theta_T = \frac{S(T+1)(2T+1)}{6} + T = \frac{S(2T^2 + 1)}{6} + \frac{ST}{2} + T. $$
Since $\frac{ST}{2} + T$ is integer and $2 \nmid 2T^2 + 1$, we obtain $2 \mid S$. Then we find that $2 \mid T$ as well, for otherwise $6(\theta_T - T)$ is not a multiple of $4$ while $6(\theta_T - T) = S(T+1)(2T+1) $ is a multiple of $4$, which is a contradiction.
So far we have proved that $b \mid T$ and $2 \mid S, T$. Since $q = \gcd(S, T)$, we may write $q = 2p$, proving $\text{(P1)}$. Plugging this back to $\theta_T$,
$$ 0 \equiv \theta_T \equiv \frac{S(T+1)(2T+1)}{6} \equiv \frac{ap(2bp+1)(4bp+1)}{3} \pmod {2}, $$
from which $\text{(P2)}$ follows. ////
Proof of Lemma 2. Let $T$ be a period of $\{e_n\}$ and let $p$ be as in Lemma 1. Write $U = \frac{T}{2}$. Then
$$ \Delta_{n,U} = apn(bpn+n+1) \quad \text{and} \quad \Delta_{n,U-1-n} = apn(bp-n-1) $$
are multiples of $ap$, which is even. So
$$e_{n+U} = e_n e_U \exp\{i\pi\Delta_{n,U}\} = e_n e_{U}.$$
Then plugging $n = U$ yields $1 = e_T = e_U^2$ and hence $e_U = \pm 1$. Similarly,
$$e_{U-1} = e_n e_{U-1-n} \exp\{i\pi\Delta_{n,U-1-n}\} = e_n e_{U-1-n}. $$
Then plugging $n = -1$ yields $e_{U-1} = e_{-1}e_U = -e_U$ and $e_{U-1-n} = -e_U \overline{e_n}$ as required. Finally, if $e_U = 1$, then we have $e_{n+U} = e_n$ and therefore $U$ is also a period. ////