1 Introduction

A few years ago, two of us in conjunction with L. Glasser were responsible for producing a paper that dealt with basic trigonometric power sums [12]. These were defined as finite sums of the form

$$\begin{aligned} S= \sum _{k=0}^{g(n)} (\pm 1)^k \, f(k) \left\{ \begin{matrix} \cos ^{2 m} \\ \sin ^{2m} \end{matrix} \right\} \left( \frac{qk \pi }{n} \right) , \end{aligned}$$

where m, q and n are positive integers, g(n) is dependent upon n such as \(n \!-\! 1\) or even \(\lfloor m/n\rfloor \), and f(k) is a relatively simple function of k, such as unity or \(\cos (k \pi /p)\), for p, an integer. In this paper, \(\lfloor x \rfloor \) denotes the floor function or the greatest integer less than or equal to x. Not only were new results derived for various interesting versions of these sums, but also important applications were studied, e.g., the determination of the number of closed walks of length 2m with \(n-1\) vertices. Although there was already an extensive bibliography on trigonometric power sums covering many decades [2, 6,7,8,9,10,11, 14, 16, 17, 19, 21, 23,24,25, 31, 33], the new work attracted much attention resulting in related subject areas being studied over the interim [1, 3,4,5, 13, 15, 18, 22, 26, 32]. In this paper, however, we aim to indicate how the material in [12] can be extended or generalized to more complex basic trigonometric power sums in addition to presenting the proof and generalization of the conjecture given in [12].

2 Another extension

In Section 2 of [12] the following pivotal results were proved

$$\begin{aligned} C(m,n) = {\left\{ \begin{array}{ll} \displaystyle 2^{1-2m} \, n \biggl (\left( {\begin{array}{c}2m-1\\ m-1\end{array}}\right) +\sum _{p=1}^{\lfloor m/n\rfloor }\left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \biggr ) \, , &{} \text{ if } m\geqslant n\,, \\ \displaystyle 2^{1-2m} \, n \left( {\begin{array}{c}2m-1\\ m-1\end{array}}\right) \;,&\hbox { if}\ m<n\,, \end{array}\right. } \end{aligned}$$
(2.1)

and

$$\begin{aligned} S(m,n)= {\left\{ \begin{array}{ll} \displaystyle 2^{1-2m} \,n \biggl (\left( {\begin{array}{c}2m-1\\ m-1\end{array}}\right) +\sum _{p=1}^{\lfloor m/n\rfloor }(-1)^{pn}\left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \biggr )\,, &{} \text{ if } m \geqslant n \,, \\ \displaystyle 2^{1-2m} \,n \left( {\begin{array}{c}2m-1\\ m-1\end{array}}\right) \,,&\hbox { if}\ m<n\,, \end{array}\right. } \end{aligned}$$
(2.2)

where

$$\begin{aligned} C(m,n) := \sum _{k=0}^{n-1} \cos ^{2m} \left( \frac{k \pi }{n} \right) , \end{aligned}$$
(2.3)

and

$$\begin{aligned} S(m,n) := \sum _{k=0}^{n-1} \sin ^{2m} \left( \frac{k \pi }{n} \right) . \end{aligned}$$
(2.4)

These results formed the basis upon which the various results in [12] were obtained, but it should be pointed out that the above results can be extended to the situation where an offset angle such as \(\alpha \pi \) appears in the argument of the trigonometric powers. That is, for m and n, positive integers, we aim to study here:

$$\begin{aligned} C_{\alpha }(m,n) := \sum _{k=0}^{n-1} \cos ^{2m} \left( \Bigl ( \frac{k}{n} + \alpha \Bigr )\pi \right) , \end{aligned}$$
(2.5)

and its sine analogue, \(S_{\alpha }(m,n)\). Note that we have avoided using the notation \(C(m,n,\alpha )\) and \(S(m,n,\alpha )\) here since C(mnq) and S(mnq) in [12] denoted the cases where the argument in the trigonometric powers possessed an extra factor of q in the numerator.

In [12], we proved the above results using No. 4.4.2.1 from [28]. Notwithstanding, more general versions of these results are given in (15.1.1) and (18.1.1) in [20]. These can be expressed as

$$\begin{aligned} \sum _{k=1}^{n}\cos ^m(kx+y)= & {} \frac{n m! (1+(-1)^m)}{2^{m+1} ((m/2)!)^2} + 2^{1-m} \sum _{k=0}^{\lfloor (m-1)/2 \rfloor } \left( {\begin{array}{c}m\\ k\end{array}}\right) \; \frac{\sin \Bigl (\bigl (m/2-k \bigr )n x\Bigr )}{\sin \Bigl ( \bigl (m/2-k\bigr ) x\Bigr )} \nonumber \\{} & {} \times \; \cos \Bigl ( \bigl (m/2-k\bigr )\bigl (2y+(n+1)x \bigr ) \Bigr ) \end{aligned}$$
(2.6)

and

$$\begin{aligned} \sum _{k=1}^{n}\sin ^m(kx+y)= & {} \frac{n m! (1+(-1)^m)}{2^{m+1} ((m/2)!)^2} + 2^{1-m} \sum _{k=0}^{\lfloor (m-1)/2 \rfloor } \left( {\begin{array}{c}m\\ k\end{array}}\right) \; \frac{\sin \Bigl (\bigl (m/2-k \bigr )n x\Bigr )}{\sin \Bigl ( \bigl (m/2-k\bigr ) x\Bigr )} \nonumber \\{} & {} \times \cos \Bigl ( \bigl (m-2k\bigr )\bigl (y+(n+1)x/2-\pi /2 \bigr ) \Bigr ). \end{aligned}$$
(2.7)

The identities (2.6)–(2.7) can be derived by

  1. (1)

    replacing the trigonometric functions on the left-hand side (lhs) by their exponential forms,

  2. (2)

    applying the binomial theorem,

  3. (3)

    interchanging the order of the summations and

  4. (4)

    re-combining the exponentials into trigonometric functions.

After more algebra and using the double angle formulas for trigonometric functions, one eventually arrives at (2.6) and (2.7). Note that the first term on the right-hand side (rhs) of the above results only yields a contribution when m is even (the main case of interest here) since an odd number of terms arises when the binomial theorem is applied.

With m replaced by 2m, \(x=\pi /n\) and \(y=\alpha \pi \), (2.6) becomes

$$\begin{aligned} \sum _{k=1}^{n} \cos ^{2m} \left( \Bigl (\frac{k}{n}+\alpha \Bigr )\pi \right)= & {} 2^{1-2m}n \left( {\begin{array}{c}2m-1\\ m\end{array}}\right) + 2^{1-2m}\sum _{k=1}^{m} (-1)^k \left( {\begin{array}{c}2m\\ m-k\end{array}}\right) \; \frac{\sin \left( k \pi \right) }{\sin \left( k \pi /n \right) } \nonumber \\{} & {} \times \cos \left( \bigl (2 \alpha +1/n\bigr )k \pi \right) . \end{aligned}$$
(2.8)

Comparing this result with (2.5) in [12], we observe that the ratio of the sine functions denoted there by R(k) remains the same. The only difference is that \(\cos (k \pi /n)\) has been replaced by \(\cos \left( \bigl (2 \alpha +1/n\bigr )k \pi \right) \) here. As stated in [12], the ratio of the sines vanishes for all values of k except when \(k=pn\), where \(p=1,2,\dots ,\lfloor m/n \rfloor \). Then we find that \(R(k)=(-1)^{(n-1)p}n \) and \(\cos \left( \bigl (2 \alpha +1/n\bigr )k \pi \right) =(-1)^p \cos (2\alpha p n \pi )\). Consequently, (2.8) becomes

$$\begin{aligned} \sum _{k=1}^{n} \cos ^{2m} \left( \Bigl (\frac{k}{n}+\alpha \Bigr )\pi \right) = 2^{1-2m}n \left( {\begin{array}{c}2m-1\\ m\end{array}}\right) + 2^{1-2m}n\sum _{p=1}^{\lfloor m/n \rfloor } \left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \; \cos \left( 2 \alpha p n \pi \right) . \end{aligned}$$
(2.9)

Similarly, using (2.7) yields

$$\begin{aligned}&\sum _{k=1}^{n} \sin ^{2m} \left( \Bigl (\frac{k}{n}+\alpha \Bigr )\pi \right) \nonumber \\&\quad = 2^{1-2m}n \left( {\begin{array}{c}2m-1\\ m\end{array}}\right) + 2^{1-2m}n\sum _{p=1}^{\lfloor m/n \rfloor } (-1)^{pn} \left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \; \cos \left( 2 \alpha p n \pi \right) . \end{aligned}$$
(2.10)

In both cases, if \(m<n\), then the sums on the rhs’s vanish. Moreover, the summations from \(k = 1\) to n in both results can be altered so the limits become \(k=0\) to \(n-1\). From these results we observe that both basic trigonometric power sums are even functions in \(\alpha \). In addition, because the sums over k on the lhs’s of (2.9) and (2.10) are effectively over the n roots of unity, which under multiplication represent a cyclic group of order n [30], and the power of the trigonometric function is even, we can introduce an arbitrary integer a, without affecting the results. The power being even counters phase changes due to the introduction of a. Therefore, for any non-zero integer a, but co-prime to n, (2.9) can be expressed as

$$\begin{aligned} \sum _{k=1}^{n} \cos ^{2m} \left( \Bigl (\frac{k a}{n}+\alpha \Bigr )\pi \right) = 2^{1-2m}n \left( {\begin{array}{c}2m-1\\ m\end{array}}\right) + 2^{1-2m}n\sum _{p=1}^{\lfloor m/n \rfloor } \left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \; \cos \left( 2 \alpha p n \pi \right) , \end{aligned}$$
(2.11)

while a similar situation applies to (2.10). If a is not co-prime to n, then one must divide out the common factors and treat the resulting sum over the roots of unity as a finite cyclic group, \(n/b_i\), where \(b_i\) are the common factors of a and n.

As expected, when \(\alpha =0\), the above results reduce to (2.1) and (2.2). These results are also obtained by putting \(\alpha = 1/2\). Moreover, if \(\cos (2 \alpha p n\pi )\) is rational for all values of p, then the modified basic trigonometric power sums will yield rational values, but this is not necessary for obtaining rational values as exemplified by the case below.

The preceding results allow us to consider basic trigonometric power sums where the power of the trigonometric function is no longer even in special cases. For example, suppose we wish to evaluate the following sum

$$\begin{aligned} \sum _{k=0}^{n-1} \sin ^m \left( \Bigl ( \frac{2 k}{n}+ \alpha \Bigl ) \pi \right) . \end{aligned}$$

By shifting the argument by \(\pi /2\) and applying the double angle formula for cosine, we can express the above sum as

$$\begin{aligned} \sum _{k=0}^{n-1} \sin ^m \left( \Bigl ( \frac{2 k}{n} + \alpha \Bigr ) \pi \right) = \sum _{k=0}^{n-1} \left( 2 \cos ^2 \left( \Bigl ( \frac{k}{n} + \frac{\beta }{2} \Bigl ) \pi \right) -1 \right) ^m, \end{aligned}$$

where \(\beta =\alpha -1/2\) and n is odd since it has to be co-prime with 2. Expanding the summand via the binomial theorem yields

$$\begin{aligned} \sum _{k=0}^{n-1} \sin ^m \left( \Bigl ( \frac{2 k}{n} + \alpha \Bigr ) \pi \right) = \sum _{j=0}^{m} (-1)^j 2^{m-j} \left( {\begin{array}{c}m\\ j\end{array}}\right) C_{\frac{\beta }{2}}(m-j,n). \end{aligned}$$
(2.12)

Recently, Cadavid et al. [3] discussed finite sums derived from a complex polynomial in 2d variables, namely \(P(x_1,\dots ,x_d; y_1, \dots ,y_d)\), where

$$\begin{aligned} x_i= \cos \Bigl ( \frac{2 \pi k_i a_i}{m_i} +\beta _i\Bigl )\,,\quad y_i=\sin \Bigl ( \frac{2 \pi k_i a_i}{m_i} + \beta _i\Bigl )\,, \end{aligned}$$

and each \(k_i\) is summed from 0 to \(m_i-1\). According to the above general form, we have d distinct sums involving powers of \(\cos (2 \pi k_i a_i/m_i+ \beta _i)\) and \(\sin (2 \pi k_i a_i/m_i+\beta _i)\), while each \(k_i\) is summed from 0 to \(m_i-1\). A closed form for these sums can also be obtained from (2.9) and (2.10). We can shift the argument in the sine sums by \(\pi /2\) as in the previous paragraph. Next the double angle formula for cosine can be applied to all the sums. If all the \(a_i\) are co-prime to \(m_i\), then utilizing the cyclic group properties of the roots of unity we can discard the \(a_i\), which, in turn, means that (2.10) and (2.11) can be applied to the sums. Finally, to obtain the entire result, a computer code is required to multiply all the results for the sums by each other.

To elucidate this further, let us consider (4) in [3], which is given as

$$\begin{aligned} CS_{\alpha _1,\alpha _2}(k,k,m_1,m_2)=\sum _{j=0}^{2m_1-1} \sum _{\ell =0}^{m_2-1} (-1)^j \cos ^k \left( \Bigl ( \frac{ja}{m_1} +\alpha _1 \Bigr ) \pi \right) \sin ^k \left( \Bigl ( \frac{2 \ell b}{m_2} + \alpha _2 \Bigr ) \pi \right) . \end{aligned}$$

The only difference between this result and (4) in [3] is that we have introduced a factor of \(\pi \) into \(\alpha _1\) and \(\alpha _2\) in accordance with the sums studied here. In the above sum, \(m_1\), \(m_2\), a, b and k are positive integers, while \(\alpha _1\) and \(\alpha _2\) can be real. In addition, it is assumed that a and b are, respectively, co-prime to \(m_1\) and \(m_2\). Let us consider the first sum in \(CS_{\alpha _1,\alpha _2}(k,k,m_1,m_2)\), which can be expressed as

$$\begin{aligned} \sum _{j=0}^{2m_1-1} (-1)^j \cos ^k \!\left( \Bigl ( \frac{ja}{m_1} +\alpha _1 \Bigr ) \pi \right) = 2 \sum _{j=0}^{m_1-1} \! \cos ^k \! \left( \Bigl ( \frac{2ja}{m_1} +\alpha _1 \Bigr ) \pi \right) -\sum _{j=0}^{2m_1-1} \! \cos ^k \! \left( \Bigl ( \frac{ja}{m_1} +\alpha _1 \Bigr ) \pi \right) . \end{aligned}$$
(2.13)

With the aid of the double angle cosine formula and the binomial theorem, the first sum on the rhs of (2.13) can be expressed as

$$\begin{aligned} \sum _{j=0}^{m_1-1} \! \cos ^k \! \left( \Bigl ( \frac{2ja}{m_1} +\alpha _1 \Bigr ) \pi \right) = \sum _{i=0}^k (-1)^i 2^{k-i} \left( {\begin{array}{c}k\\ i\end{array}}\right) C_{\frac{\alpha _1}{2}}(k-i,m_1). \end{aligned}$$
(2.14)

The second sum on the rhs of (2.13) can be written as

$$\begin{aligned} \sum _{j=0}^{2m_1-1} \cos ^k \! \left( \Bigl ( \frac{ja}{m_1} +\alpha _1 \Bigr ) \pi \right) =\sum _{j=0}^{2m_1-1} \cos ^k \! \left( \Bigl ( \frac{2ja}{2m_1} +\alpha _1 \Bigr ) \pi \right) . \end{aligned}$$

Next, we apply the double angle formula for cosine and expand the resulting sum with the aid of the binomial theorem. Since the powers of \(\cos \left( \bigl (\frac{ja}{2m_1} +\frac{\alpha _1}{2}\bigr )\pi \right) \) are even and a is co-prime to \(m_1\), we can discard a by invoking the cyclic properties of the roots of unity. Hence we arrive at

$$\begin{aligned} \sum _{j=0}^{2m_1-1} \cos ^k \! \left( \Bigl ( \frac{ja}{m_1} +\alpha _1 \Bigr ) \pi \right) =\sum _{i=0}^{k} (-1)^i 2^{k-i} \left( {\begin{array}{c}k\\ i\end{array}}\right) C_{\frac{\alpha _1}{2}}(k-i,2m_1). \end{aligned}$$

Therefore, (2.13) becomes

$$\begin{aligned} \sum _{j=0}^{2m_1-1} (-1)^j \cos ^k \!\left( \Bigl ( \frac{ja}{m_1} +\alpha _1 \Bigr ) \pi \right) =\sum _{i=0}^k (-1)^i 2^{k-i} \left( {\begin{array}{c}k\\ i\end{array}}\right) \Bigl ( 2 C_{\frac{\alpha _1}{2}}(k-i,m_1)- C_{\frac{\alpha _1}{2}}(k-i,2m_1) \Bigr ). \end{aligned}$$
(2.15)

The basic trigonometric power sum over \(\ell \) in \(CS_{\alpha _1,\alpha _2}(k,k,m_1,m_2)\) can be evaluated from (2.12) since b is co-prime to \(m_2\). Hence we find that

$$\begin{aligned} \sum _{\ell =0}^{m_2-1} \sin ^k \!\left( \Bigl ( \frac{2 \ell b}{m_2} +\alpha _2 \Bigr ) \pi \right) = \sum _{i=0}^k (-1)^i 2^{k-i} \left( {\begin{array}{c}k\\ i\end{array}}\right) C_{{\frac{\alpha _2}{2}}-{\frac{1}{4}}}(k-i,m_2). \end{aligned}$$
(2.16)

Multiplying (2.15) by (2.16) yields

$$\begin{aligned} CS_{\alpha _1,\alpha _2}(k,k,m_1,m_2)= & {} \sum _{i=0}^k (-1)^i 2^{k-i} \left( {\begin{array}{c}k\\ i\end{array}}\right) \Bigl ( 2 C_{\frac{\alpha _1}{2}}(k-i,m_1)- C_{\frac{\alpha _1}{2}}(k-i,2m_1) \Bigr ) \nonumber \\{} & {} \times \; \sum _{i=0}^k (-1)^i 2^{k-i} \left( {\begin{array}{c}k\\ i\end{array}}\right) C_{{\frac{\alpha _2}{2}}-{\frac{1}{4}}}(k-i,m_2). \end{aligned}$$
(2.17)

Although (2.17) appears to be complicated, it can be easily computed by creating a module in Mathematica.

For the special case of \(\alpha = 1/4\), when n is even, say equal to 2N, (2.9) and (2.10) reduce to

$$\begin{aligned} \sum _{k=1}^{2N} \cos ^{2m} \left( \frac{k\pi }{2N}+\frac{\pi }{4} \right)= & {} \sum _{k=1}^{2N} \sin ^{2m} \left( \frac{k \pi }{2N}+\frac{\pi }{4} \right) \nonumber \\= & {} 2^{2-2m}N \left( {\begin{array}{c}2m-1\\ m\end{array}}\right) + 2^{2-2m} N\sum _{p=1}^{\lfloor m/2N\rfloor } (-1)^{pN} \left( {\begin{array}{c}2m\\ m-2pN\end{array}}\right) .\nonumber \\ \end{aligned}$$
(2.18)

For odd values of n, say \(2N+1\), we obtain

$$\begin{aligned} \sum _{k=1}^{2N+1} \cos ^{2m} \left( \frac{k \pi }{2N+1} +\frac{\pi }{4} \right)= & {} \sum _{k=1}^{2N+1} \sin ^{2m} \left( \frac{k \pi }{2N+1}+\frac{\pi }{4} \right) \\= & {} 2^{1-2m}(2N+1) \left( {\begin{array}{c}2m-1\\ m\end{array}}\right) + 2^{1-2m} (2N+1)\\{} & {} \times \sum _{p=1}^{\lfloor m/(4N+2) \rfloor } (-1)^{p} \left( {\begin{array}{c}2m\\ m-p(4N+2)\end{array}}\right) . \end{aligned}$$

Since \(\alpha \) is arbitrary, we can multiply (2.9) by \(\cos (\alpha y)\) and then integrate over \(\alpha \) between \(-\infty \) and \(\infty \), bearing in mind that the basic cosine power sum is even in \(\alpha \). Then we find that

$$\begin{aligned}{} & {} \int _{0}^{\infty } \sum _{k=1}^{n} \cos ^{2m} \left( \Bigl (\frac{k}{n}+\alpha \Bigr )\pi \right) \cos (y \alpha ) d\alpha \nonumber \\{} & {} \quad = \frac{n}{2^m} \sum _{p=1}^{\lfloor m/n \rfloor } \left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \int _{-\infty }^{\infty } \cos (2pn\pi \alpha ) \cos (y\alpha ) d\alpha . \end{aligned}$$
(2.19)

In obtaining this result, we have used the Fourier transform representation for the delta function, which appears as No. 1.17.12 in [27], to show that the cosine integral arising from the first term of the rhs of (2.9) vanishes in accordance with the theory of generalized functions. The lhs of the above equation can be regarded as the Fourier cosine transform of \(C_{\alpha }(m,n)\), while the integral on the rhs yields \(2 \pi \delta (y-2pn\pi )\). Hence, (2.19) reduces to

$$\begin{aligned} {{\mathcal {F}}}_C \Bigl [ C_{\alpha }(m,n) \Bigr ](y)= 2^{1-m} \pi n \sum _{p=1}^{\lfloor m/n \rfloor } \left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \delta (y-2pn\pi ), \end{aligned}$$

where

$$\begin{aligned} {{\mathcal {F}}}_C \Bigl [ f(x) \Bigr ](y)= \int _0^{\infty } f(x) \cos (x y)\; dx. \end{aligned}$$

For \(m<n\), the Fourier cosine transform vanishes, while for \(m=n\), one obtains

$$\begin{aligned} \delta (y-2n\pi )=\frac{2^{n-1}}{\pi n} {{\mathcal {F}}}_C \Bigl [ C_{\alpha }(n,n) \Bigr ](y). \end{aligned}$$

Similarly, we arrive at

$$\begin{aligned} {{\mathcal {F}}}_C \Bigl [ S_{\alpha }(m,n) \Bigr ](y)= 2^{1-m} \pi n \sum _{p=1}^{\lfloor m/n \rfloor } (-1)^{pn}\left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \delta (y-2pn\pi ). \end{aligned}$$

3 Extra phase factors in summands

In order to obtain results for basic trigonometric power sums with an extra trigonometric phase factor of the form \(\cos (2\pi k/q)\) in them, we employ the following identity:

$$\begin{aligned} \eta _q(k)=\sum _{j=1}^{q} e^{2\pi i jk/q}={\left\{ \begin{array}{ll} q, &{} k\equiv 0\; ( \textrm{mod} \; q),\\ 0,&{} \textrm{otherwise}. \end{array}\right. } \end{aligned}$$
(3.1)

The sum of the terms where j is co-prime to q is known as Ramanujan’s sum [29]. The above identity can be introduced into basic trigonometric power sums after both the denominator and numerator of the argument in the trigonometric power are multiplied by q as described in [12]. In the case of the modified basic trigonometric power sums with an offset, however, we multiply both k and n in the argument of the trigonometric power by q. According to (2.5), the cosine version becomes

$$\begin{aligned} C_{\alpha }(m,n) = \sum _{k=0}^{n-1} \cos ^{2m} \left( \Bigl (\frac{k}{n}+\alpha \Bigr )\pi \right) = \sum _{k=0}^{n-1} \cos ^{2m} \left( \Bigl (\frac{qk}{qn}+\alpha \Bigr )\pi \right) . \end{aligned}$$

If we replace k by kq and introduce (3.1), then we find that

$$\begin{aligned} \sum _{k=0}^{qn-1} \sum _{j=1}^{q-1} e^{2\pi i jk/q}\cos ^{2m} \left( \Bigl (\frac{k}{qn} +\alpha \Bigr )\pi \right) = q\, C_{\alpha }(m,n)-C_{\alpha }(m,qn). \end{aligned}$$
(3.2)

By putting \(q =2\), we obtain the alternating versions of the basic trigonometric power sums. For example, (3.2) reduces to

$$\begin{aligned} \sum _{k=0}^{2n-1} (-1)^k \cos ^{2m} \left( \Bigl (\frac{k}{2n} +\alpha \Bigr )\pi \right) = 2 C_{\alpha }(m,n)-C_{\alpha }(m,2n). \end{aligned}$$

Thus, (3.2) in [12] has been generalized due to the inclusion of the offset, \(\alpha \pi \). More formally, it can be expressed as

$$\begin{aligned} \sum _{k=0}^{2n-1} (-1)^k \cos ^{2m} \left( \Bigl ( \frac{k}{2n}+\alpha \Bigr ) \pi \right) = {\left\{ \begin{array}{ll} \displaystyle 2^{2-2m} \, n \left( \sum _{p=1}^{\lfloor m/n \rfloor }\left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \cos (2\alpha pn\pi )\right. \\ \displaystyle -\sum _{p=1}^{\lfloor m/2n \rfloor }\left( {\begin{array}{c}2m\\ m-2pn\end{array}}\right) \cos (4 \alpha p n \pi )\Bigg )\,, &{} \textrm{if} \; m\geqslant 2 n \, , \\ \displaystyle 2^{2-2m} n \sum _{p=1}^{\lfloor m/n\rfloor }\left( {\begin{array}{c}2m\\ m-pn\end{array}}\right) \cos (2\alpha pn \pi )\,, &{} \textrm{if}\; n \leqslant m<2n \,, \\ \displaystyle 0 \, , &{} \textrm{if} \; m<n\, . \end{array}\right. } \end{aligned}$$
(3.3)

The above result generalizes (3.4) in [12]. Similarly, we can replace the cosine power in (3.2) by the corresponding sine power. Then we arrive at

$$\begin{aligned} \sum _{k=0}^{2n-1} (-1)^k \sin ^{2m} \left( \Bigl (\frac{k}{2n} +\alpha \Bigr )\pi \right) = 2 S_{\alpha }(m,n)-S_{\alpha }(m,2n). \end{aligned}$$
(3.4)

Hence (2.10) can be introduced into (3.4), thereby yielding the corresponding form of (3.3).

For \(q=3\), (3.2) reduces to

$$\begin{aligned} 2 \sum _{k=0}^{3n-1} \cos \Bigl ( \frac{2 k \pi }{3} \Bigr ) \cos ^{2m} \left( \Bigl ( \frac{k}{3n}+ \alpha \Bigr ) \pi \right) = 3 C_{\alpha }(m,n)- C_{\alpha }(m,3n). \end{aligned}$$
(3.5)

This represents the generalization of (3.11) in [12]. The \(\cos (2k \pi /3)\) factor in the above result represents the term in (3.1) where the summation index j is co-prime to q, i.e., 3 in the above case. Table 1 displays the first ten values of the sum, which are denoted by \(c_{q}(k)\) in the literature.

Table 1 The first ten values of Ramanujan’s sum, \(c_q(k)\)

An important property of \(c_q(k)\) is that it is always an integer. Moreover, for any integer q, \(\eta _q(k)\) can be expressed in terms of \(c_q(k)\) as

$$\begin{aligned} \eta _q(k)=\sum _{d \vert q} c_d(k), \end{aligned}$$

where the sum in the rhs is over all the divisors d of q. For q equal to a prime number greater than 2, say r, we have \(\eta _r(k) =c_r(k)+1\). Hence (3.1) reduces to

$$\begin{aligned} \sum _{j=1}^{(r-1)/2} \cos \Bigl ( \frac{2 \pi j k}{r} \Bigr ) = {\left\{ \begin{array}{ll} (r-1)/2, &{} k\equiv 0\; ( \textrm{mod} \; r),\\ -1/2,&{} \textrm{otherwise}. \end{array}\right. } \end{aligned}$$

Consequently, in this case, (3.2) can be expressed alternatively as

$$\begin{aligned} \sum _{k=0}^{rn-1} c_r(k) \cos ^{2m}\left( \Bigl (\frac{k}{rn} +\alpha \Bigr )\pi \right) = r\, C_{\alpha }(m,n)-C_{\alpha }(m,rn). \end{aligned}$$
(3.6)

Similarly, we find that

$$\begin{aligned} \sum _{k=0}^{rn-1} c_r(k) \sin ^{2m} \left( \Bigl (\frac{k}{rn} +\alpha \Bigr )\pi \right) = r\, S_{\alpha }(m,n)-S_{\alpha }(m,rn). \end{aligned}$$
(3.7)

If we put \(r =3\) in (3.6), then we obtain (3.5), while \(r=3\) in (3.7) yields

$$\begin{aligned} \sum _{k=0}^{3n-1} c_3(k) \sin ^{2m} \left( \Bigl (\frac{k}{3n} + \alpha \Bigr )\pi \right) = 3\, S_{\alpha }(m,n)-S_{\alpha }(m,3n). \end{aligned}$$
(3.8)

Thus, we see that (3.5) and (3.8) represent generalizations of (3.12) and (3.13) in [12], respectively. As an aside, it should be mentioned that the term of 3 inside the brackets on the rhs of the equation immediately above (3.17) in [12] should be removed. Consequently, the phrase “except for the term of 3/2" in the sentence below the equation should be deleted.

If we put \(r=5\) in (3.6), then we arrive at

$$\begin{aligned} \sum _{k=0}^{5n-1} c_5(k) \cos ^{2m}\left( \Bigl ( \frac{k}{5n}+ \alpha \Bigr ) \pi \right) = 5 C_{\alpha }(m,n)- C_{\alpha }(m,5n) . \end{aligned}$$
(3.9)

Introducing the \(q = 5\) result in Table 1  yields the generalization of (9.2) in [12]. By using the prosthaphaeresis formula, we can express the above result as

$$\begin{aligned}{} & {} \sum _{k=0}^{5n-1} \cos \left( \frac{3 \pi k}{5} \right) \cos \left( \frac{\pi k}{5} \right) \cos ^{2m}\left( \Bigl ( \frac{k}{5n}+ \alpha \Bigr ) \pi \right) \nonumber \\{} & {} \quad = \sum _{k=0}^{5n-1} \cos \left( \frac{2 \pi k}{5} \right) \cos \left( \frac{4 \pi k}{5} \right) \cos ^{2m}\left( \Bigl ( \frac{k}{5n}+ \alpha \Bigr ) \pi \right) \nonumber \\{} & {} \quad = \frac{5}{4}\, C_{\alpha }(m,n) -\frac{1}{4}\, C_{\alpha }(m,5n). \end{aligned}$$
(3.10)

In Appendix B of [12] it was stated that it was not a simple matter to consider each component basic trigonometric power sum comprising Ramanujan’s sum separately. For example, in the case of \(\eta _5(k)\) or \(c_5(k)\) there are two component basic trigonometric sums, one involving \(\cos (2k \pi /5)\) and the other involving \(\cos (4 \pi k/5)\). That is, the two component sums are

$$\begin{aligned} 2\sum _{k=0}^{5n-1} \cos \left( \frac{2 k \pi }{5} \right) \cos ^{2m}\Bigl ( \frac{k \pi }{5n}\Bigr ), \end{aligned}$$

and

$$\begin{aligned} 2\sum _{k=0}^{5n-1} \cos \left( \frac{4 k \pi }{5} \right) \cos ^{2m} \Bigl ( \frac{k \pi }{5n}\Bigr ). \end{aligned}$$

These sums appear to be irrational once expressions for \(\cos (2k \pi /5)\) and \(\cos (4k \pi /5)\) are introduced into them. These expressions can be obtained by solving the equation, \(c_5(k)=-1\), which is valid whenever \(k\not \equiv 0\; ( \textrm{mod} \; 5)\). Then one finds that

$$\begin{aligned} \cos \Bigl (\frac{k \pi }{5} \Bigr )= & {} {\left\{ \begin{array}{ll} (-1)^{k/5}, &{} k\equiv 0\; ( \textrm{mod} \; 5)\,, \\ (-1)^{\lfloor (k+2)/5\rfloor } \frac{\sqrt{5}}{4}+\frac{(-1)^{k+1}}{4}, &{} k\not \equiv 0\; ( \textrm{mod} \; 5)\,, \end{array}\right. } \end{aligned}$$
(3.11)
$$\begin{aligned} \cos \Bigl (\frac{2 k \pi }{5} \Bigr )= & {} {\left\{ \begin{array}{ll} 1, &{} k\equiv 0\; ( \textrm{mod} \; 5)\,, \\ (-1)^{\lfloor (2k+2)/5\rfloor } \frac{\sqrt{5}}{4}-\frac{1}{4}, &{} k\not \equiv 0\; ( \textrm{mod} \; 5)\,, \end{array}\right. } \end{aligned}$$
(3.12)

and

$$\begin{aligned} \cos \Bigl (\frac{4 k \pi }{5} \Bigr )= {\left\{ \begin{array}{ll} 1, &{} k\equiv 0\; ( \textrm{mod} \; 5)\, , \\ (-1)^{\lfloor (4k+2)/5\rfloor } \frac{\sqrt{5}}{4}-\frac{1}{4}, &{} k\not \equiv 0\; ( \textrm{mod} \; 5)\, . \end{array}\right. } \end{aligned}$$

The first of these results is given incorrectly in No. I.11.5 of [28]. Introducing (3.12) into the first component sum, namely that with \(\cos (2k\pi /5)\), yields

$$\begin{aligned} 2\sum _{k=0}^{5n-1} \cos \left( \frac{2 k \pi }{5} \right) \cos ^{2m}\Bigl ( \frac{k \pi }{5n}\Bigr )= & {} 2 C(m,n)+ \frac{\sqrt{5}}{2} \sum _{\begin{array}{c} k=0 \\ { k\not \equiv 0\; ( \textrm{mod} \; 5)} \end{array}}^{5n-1} (-1)^{\lfloor (2k+2)/5 \rfloor } \cos ^{2m} \Bigl ( \frac{k \pi }{5n}\Bigr ) \nonumber \\{} & {} -\;\frac{1}{2}\sum _{\begin{array}{c} k=0 \\ { k\not \equiv 0\; ( \textrm{mod} \; 5)} \end{array}}^{5n-1} \cos ^{2m} \Bigl ( \frac{k \pi }{5n}\Bigr ). \end{aligned}$$
(3.13)

We cannot introduce (3.11) into the above equation because n appears in the denominator. Thus, we are unable to determine whether all terms with \(\sqrt{5}\) can be cancelled. A similar situation applies to the second component sum involving \(\cos (4k \pi /5)\). Therefore, from these results we cannot determine whether they are rational or not.

In Appendix B of [12] we were able to evaluate (3.13) by using No. I.1.10 in [28]. Although the result was not elegant, it nevertheless meant that the basic cosine power sums mentioned above were rational. Here, we generalize this approach with the presentation of the following theorem, which aims to facilitate the evaluation of the component sums when Ramanujan’s sum appears in a basic cosine power sum.

Theorem 3.1

An expression for the basic cosine power sum

$$\begin{aligned} \sum _{k=0}^{qn-1} \cos \Bigl ( \frac{2\ell k \pi }{q} \Bigr ) \cos ^{2m} \Bigl ( \frac{k \pi }{qn}\Bigr ), \end{aligned}$$

where q is odd, is

$$\begin{aligned} 2^{2\ell n-1} C(m+ \ell n,qn) + \ell n \sum _{j=0}^{\ell n-1} \frac{(-1)^{j+1}}{j+1} \left( {\begin{array}{c}2 \ell n-j-2\\ j\end{array}}\right) \, 2^{2\ell n-2j-2} C(m+\ell n-j-1,qn). \end{aligned}$$
(3.14)

Proof

From No. I.1.10 in [28], we can express the first cosine in the summand as

$$\begin{aligned} \cos \Bigl ( \frac{2\ell k \pi }{q} \Bigr )&= 2^{2 \ell n-1} \cos ^{2 \ell n} \Bigl ( \frac{k \pi }{qn} \Bigr ) + \ell n \sum _{j=0}^{\ell n-1} \frac{(-1)^{j+1}}{j+1} \left( {\begin{array}{c}2 \ell n-j-2\\ j\end{array}}\right) \\&\quad \times 2^{2 \ell n-2j-2} \cos ^{2 \ell n-2j-2} \Bigl ( \frac{k \pi }{qn} \Bigr ). \end{aligned}$$

Next we multiply both sides by \(\cos ^{2m}(k\pi /qn)\) and then sum from \(k=0\) to \(qn-1\). Hence we obtain

$$\begin{aligned} \sum _{k=0}^{qn-1}\cos \Bigl ( \frac{2 \ell k \pi }{q} \Bigr ) \cos ^{2m} \Bigl ( \frac{k \pi }{qn}\Bigr )= & {} 2^{2 \ell n-1} \sum _{k=0}^{qn-1} \cos ^{2m+2 \ell n}\Bigl ( \frac{k \pi }{qn} \Bigr )\nonumber \\{} & {} + \ell n \sum _{j=0}^{ \ell n-1} \frac{(-1)^{j+1}}{j+1} \left( {\begin{array}{c}2 \ell n-j-2\\ j\end{array}}\right) \nonumber \\{} & {} \times \; 2^{2 \ell n-2j-2} \sum _{k=0}^{qn-1} \cos ^{2m+2 \ell n-2j-2} \Bigl ( \frac{k \pi }{qn} \Bigr ).\nonumber \\ \end{aligned}$$
(3.15)

The sums over k on the rhs in the above result are simple versions of the basic cosine power sum defined by (2.3). Consequently, (3.15) reduces to (3.14). \(\square \)

Since we have seen in [12] that C(mn) is rational, it follows that the cosine power sums as the ones considered in Theorem 3.1 are also rational. Moreover, for \(q=5\), (3.14) reduces to

$$\begin{aligned} \sum _{k=0}^{5n-1}\cos \Bigl ( \frac{2 \ell k \pi }{5} \Bigr ) \cos ^{2m} \Bigl ( \frac{k \pi }{5n}\Bigr )= & {} 2^{2 \ell n-1} C(\ell n+m,5n) + \ell n \sum _{j=0}^{\ell n-1} \frac{(-1)^{j+1}}{j+1} \left( {\begin{array}{c}2 \ell n-j-2\\ j\end{array}}\right) \nonumber \\{} & {} \times \; 2^{2 \ell n-2j-2} C(\ell n+m-j-1,5n). \end{aligned}$$

Putting \(\ell =1\) in the above result yields (9.9) in [12], while for \(\ell =2\), we obtain

$$\begin{aligned} \sum _{k=0}^{5n-1}\cos \Bigl ( \frac{4 k \pi }{5} \Bigr ) \cos ^{2m} \Bigl ( \frac{k \pi }{5n}\Bigr )= & {} 2^{4n-1} C(m+2n,5n) + 2n \sum _{j=0}^{2n-1} \frac{(-1)^{j+1}}{j+1} \left( {\begin{array}{c}4n-j-2\\ j\end{array}}\right) \nonumber \\{} & {} \times \; 2^{4n-2j-2} C(m+2n-j-1,5n). \end{aligned}$$
(3.16)

Note that the sum over j involves 2n terms, whereas the sum over j in (9.9) in [12] involves only n terms, which is due to the fact that \(r=2\) in the above result compared with \(r=1\) in (9.9) of [12]. When (3.16) is combined with (9.9) in [12] and multiplied by 2, we obtain the \(\alpha =0\) or zero offset form of (3.9). An interesting feature about this combination is that C(mn) does not appear in it, but C(mn) does appear on the rhs of (3.9). This means that we can obtain an expression for C(mn) in terms of higher powers of cosine in the basic cosine power sum. More generally, if we set \(q=r\), a prime number greater than 2, then we can sum for \(\ell =1\) to \((r-1)/2\) all the terms on both sides of (3.14) and multiply by 2. Hence we arrive at

$$\begin{aligned} \sum _{k=0}^{rn-1} c_r(k) \cos ^{2m} \Bigl ( \frac{k \pi }{rn}\Bigr )= & {} \sum _{\ell =1}^{(r-1)/2} 2^{2\ell n} C(m+\ell n,rn) + 2n \sum _{\ell =1}^{(r-1)/2} \ell \sum _{j=0}^{ \ell n-1} \frac{(-1)^{j+1}}{j+1}\nonumber \\{} & {} \times \left( {\begin{array}{c}2 \ell n-j-2\\ j\end{array}}\right) \; 2^{2 \ell n-2j-2} C(m+\ell n-j-1,rn).\nonumber \\ \end{aligned}$$
(3.17)

Replacing the lhs of (3.17) by the rhs of (3.6) with \(\alpha =0\) yields

$$\begin{aligned} r C(m,n)= & {} \sum _{\ell =0}^{(r-1)/2} 2^{2\ell n} C(m+\ell n,rn) + 2n \sum _{\ell =1}^{(r-1)/2} \ell \sum _{j=0}^{ \ell n-1} \frac{(-1)^{j+1}}{j+1} \left( {\begin{array}{c}2 \ell n-j-2\\ j\end{array}}\right) \nonumber \\{} & {} \times \quad 2^{2 \ell n-2j-2} C(m+\ell n-j-1,rn). \end{aligned}$$
(3.18)

Hence we have obtained another representation for C(mn). In particular, for \(r = 3\), (3.18) yields

$$\begin{aligned} 3 C(m,n)= & {} C(m,3n) +2^{2n} C(m+n,3n)+2n \sum _{j=0}^{n-1} \frac{(-1)^{j+1}}{j+1} \, \left( {\begin{array}{c}2n-j-2\\ j\end{array}}\right) 2^{2n-2j-2} \nonumber \\{} & {} \times \; C(m+n-j-1,3n). \end{aligned}$$

Therefore, we observe that C(mn) can be expressed as a finite sum of \(C(m+j,3n)\), where j takes on special integers including n and 0.

To conclude this section, it should be noted that when q is a prime of the form \(2^{\ell }+1\), where \(\ell \) is a positive integer, \(c_q(k)\) can be expressed as a product of cosines. By continually applying the double angle formula to the sum of cosines in \(c_q(k)\), one obtains the following identity:

$$\begin{aligned} c_q(k)=2 \sum _{j=1}^{2^{\ell -1}} \cos \Bigl ( \frac{2 \pi j k}{q} \Bigr )= 2^{\ell } \cos \Bigl (\frac{(2^{\ell -1}+1) \pi k}{q} \Bigr ) \prod _{i=1}^{\ell -1} \cos \Bigl ( \frac{2^{\ell -i-1} \pi k}{q}\Bigr ). \end{aligned}$$
(3.19)

For \(\ell =2\), we obtain (3.10), while for \(q=17\) or \(\ell =4\), we have

$$\begin{aligned} c_{17}(k) =16 \cos \Bigl ( \frac{9 \pi k}{17} \Bigr ) \cos \Bigl ( \frac{4 \pi k}{17} \Bigr ) \cos \Bigl ( \frac{2 \pi k}{17} \Bigr ) \cos \Bigl ( \frac{\pi k}{17} \Bigr ). \end{aligned}$$

Consequently, by using (3.2), we arrive at

$$\begin{aligned}&\sum _{k=0}^{17n-1} \cos \Bigl ( \frac{9 \pi k}{17} \Bigr ) \cos \Bigl ( \frac{4 \pi k}{17} \Bigr ) \cos \Bigl ( \frac{2 \pi k}{17} \Bigr ) \cos \Bigl ( \frac{\pi k}{17} \Bigr ) \cos ^{2m} \left( \frac{k \pi }{17n}\right) \\&\qquad \quad = \frac{17}{16} \, C(m,n) -\frac{1}{16} \,C(m,17n). \end{aligned}$$

It should be mentioned that (3.19) can be applied to integers of the form \(2^{\ell }+1\), which are not prime. For these cases we replace \(c_q(k)\) by \(\eta _q(k)-1\). Therefore, the modification of (3.19) for \(\ell =3\) or \(q=9\) yields

$$\begin{aligned} \eta _9(k)-1 = 8 \cos \Bigl ( \frac{5 \pi k}{9} \Bigr ) \cos \Bigl ( \frac{2 \pi k}{9} \Bigr ) \cos \Bigl ( \frac{\pi k}{9} \Bigr ). \end{aligned}$$
(3.20)

To obtain \(c_9(k)\), we need to subtract \(2 \cos \bigl ( 2 \pi k/3)\) from the above result, the only term possessing a divisor of 9. Nevertheless, we can introduce the above result into (3.2), which yields

$$\begin{aligned} \sum _{k=0}^{9n-1} \cos \Bigl ( \frac{5 \pi k}{9} \Bigr ) \cos \Bigl ( \frac{2 \pi k}{9} \Bigr ) \cos \Bigl ( \frac{\pi k}{9} \Bigr ) \cos ^{2m} \left( \frac{k \pi }{9n}\right) = \frac{9}{8} \, C(m,n) -\frac{1}{8} \,C(m,9n). \end{aligned}$$

After more algebra, we find that

$$\begin{aligned} \sum _{k=0}^{9n-1} c_9(k) \cos ^{2m} \left( \frac{k \pi }{9n}\right) = 9 C(m,n)-C(m,9n)-2C(m,3n) +C_{\frac{1}{9n}}(m,3n)+ C_{\frac{2}{9n}}(m,3n), \end{aligned}$$

where the last three terms on the rhs arise from the cosine power multiplied by \(2\cos (2\pi k/3)\).

For q, a prime of the form \(2^{\ell }-1\), the equivalent of (3.19) is

$$\begin{aligned} c_q(k)= & {} 2 \sum _{j=1}^{2^{\ell -1}-1} \cos \Bigl ( \frac{2 \pi j k}{q} \Bigr )= 2^{\ell } \cos \Bigl (\frac{(2^{ \ell -1}+1) \pi k}{q} \Bigr ) \prod _{i=1}^{\ell -1} \cos \Bigl ( \frac{2^{\ell -i-1} \pi k}{q}\Bigr )- 2\cos \Bigl ( \frac{2^{\ell } \pi k}{q} \Bigr ). \end{aligned}$$

For \(q=7\), (3.2) or (3.6) yields

$$\begin{aligned}{} & {} \sum _{k=0}^{7n-1} \cos \Bigl ( \frac{5 \pi k}{7} \Bigr ) \cos \Bigl ( \frac{2 \pi k}{7} \Bigr ) \cos \Bigl ( \frac{\pi k}{7} \Bigr ) \cos ^{2m} \left( \frac{k \pi }{7n} \right) - \frac{1}{4}\sum _{k=0}^{7n-1} \cos \left( \frac{8 \pi k}{7}\right) \cos ^{2m}\left( \frac{k \pi }{7 n} \right) \nonumber \\{} & {} \qquad \qquad \qquad = \frac{7}{8} \, C(m,n) -\frac{1}{8} \, C(m,7n). \end{aligned}$$
(3.21)

From Theorem 3.1, we find that

$$\begin{aligned} \sum _{k=0}^{7n-1} \cos \left( \frac{8 \pi k}{7}\right) \cos ^{2m}\left( \frac{k \pi }{7 n} \right)= & {} \sum _{k=0}^{7n-1} (-1)^k \cos \left( \frac{\pi k}{7}\right) \cos ^{2m}\left( \frac{k \pi }{7 n} \right) \\= & {} 2^{8n-1} C(m+4n,7n) + 4n \sum _{j=0}^{4n-1} \frac{(-1)^{j+1}}{j+1} \\{} & {} \left( {\begin{array}{c}8n-j-2\\ j\end{array}}\right) 2^{8n-2j-2} C(m+4n-j-1,7n). \end{aligned}$$

Then the first sum on the lhs of (3.21) can be written as

$$\begin{aligned}{} & {} \sum _{k=0}^{7n-1} \cos \Bigl ( \frac{5 \pi k}{7} \Bigr ) \cos \Bigl ( \frac{2 \pi k}{7} \Bigr ) \cos \Bigl ( \frac{\pi k}{7} \Bigr ) \cos ^{2m} \left( \frac{k \pi }{7n} \right) \\{} & {} \quad = \frac{7}{8} \, C(m,n) -\frac{1}{8} \, C(m,7n)+2^{8n-3} C(m+4n,7n)\nonumber \\{} & {} \qquad + n\sum _{j=0}^{4n-1} \frac{(-1)^{j+1}}{j+1} \left( {\begin{array}{c}8n-j-2\\ j\end{array}}\right) 2^{8n-2j-2} C(m+4n-j-1,7n). \end{aligned}$$

Therefore, whilst some intricate examples of basic cosine power sums have been introduced here, they are, nevertheless, combinatorial in nature or rational because C(mn) is rational.

4 Proof of a conjecture

It was also found in [12] that

$$\begin{aligned} \sum _{k=0}^{2n-1} (-1)^k \cos ^{2m} \left( \frac{k \pi }{2n} \right) = 2 C(m,n)-C(m,2n), \end{aligned}$$
(4.1)

and

$$\begin{aligned} \sum _{k = 0}^{4n-1} \cos \left( \frac{k \pi }{2} \right) \cos ^{2m} \left( \frac{k \pi }{4n} \right) = 2C(m,n)-C(m,2n). \end{aligned}$$
(4.2)

As a consequence, it was conjectured in Section 3 of the paper that multiplying and dividing by \(2^n\) in either C(mn) or S(mn) will not yield new results. We confirm this conjecture with the following theorem.

Theorem 4.1

For \(r \geqslant 1\),

$$\begin{aligned} \sum _{k=0}^{2^r n-1} \cos ^{2m} \left( \frac{k \pi }{2^r n} \right) \prod _{i=0}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) = 2 C(m,n)-C(m,2n). \end{aligned}$$
(4.3)

Proof

Note that for \(r = 1\), in particular, (4.3) reduces to (3.2) in [12] (also (4.1) above), since \(\cos ( k \pi ) = (-1)^k\). For \(r = 2\), we observe that since \(\cos (k \pi / 2 ) \ne 0\) when k is even, \(\cos (k \pi ) \cos (k \pi /2)\) does not vanish for even values of k. In this case,

$$\begin{aligned} \cos \left( k \pi \right) \cos \left( \frac{k \pi }{2} \right) = \cos \left( \frac{k \pi }{2} \right) , \end{aligned}$$

and (4.3) reduces to the above result (4.2), which is (3.2) in [12].

To prove the theorem, we shall make use of induction. Since the \(r =1\) case (4.1) has been established in [12], we consider \(r \!\ge \! 2\). For the product in (4.3) not to vanish, the \(i = 1\) term or \(\cos (k\pi /2)\) must not equal zero, which, in turn, means that k must be even. For even values of k, the product reduces to

$$\begin{aligned} \prod _{i=0}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) = \prod _{i=1}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) . \end{aligned}$$
(4.4)

Then the lhs of (4.3) becomes

$$\begin{aligned} \sum _{k=0}^{2^r n-1} \cos ^{2m} \left( \frac{k \pi }{2^r n} \right) \prod _{i=0}^ {r-1} \cos \left( \frac{k \pi }{2^i} \right) = \sum _{k=0,2,4, \dots }^{2^r n-2} \cos ^{2m} \left( \frac{k \pi }{2^r n} \right) \prod _{i=1}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) . \end{aligned}$$
(4.5)

Replacing k/2 by k on the rhs of (4.5) yields

$$\begin{aligned} \sum _{k=0, 2, 4, \dots }^{2^r n-2} \cos ^{2m} \left( \frac{k \pi }{2^r n} \right) \prod _{i=1}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) = \sum _{k=0}^{2^{r-1} n-1} \cos ^{2m} \left( \frac{k \pi }{2^{r-1} n} \right) \prod _{i=1}^{r-1} \cos \left( \frac{k \pi }{2^{i-1}} \right) . \end{aligned}$$

Now we replace i by \(i+1\) on the rhs of the above result and observe that the rhs has become the \(r\!-\!1\) version of the lhs of (4.5). By replacing k/2 by k in a similar manner, we obtain the \(r \!-2\!\)  version of the lhs of (4.5). We continue this process until the upper limit in the sum equals \(4n - 1\) (i.e., \(r = 2\)). Thus, the sum on the lhs of (4.5) can be expressed by the rhs of (4.2) for all values up to r.

All that remains are to show that the \(r+1\) version of the basic cosine power sum reduces to the lhs of (4.3), which simply follows by substituting r by \(r+1\) and replacing k/2 by k in (4.4) as above. Since we have shown that the cases of \(r=1\) and 2 hold, (4.3) will hold for \(r=3, 4\) and so on. That is, it holds for all positive integers. \(\square \)

From the result for S(mn) or (2.2), it was found in [12] that the following basic sine power sum with an alternating phase in the summand is given by

$$\begin{aligned} \sum _{k=0}^{2n-1} (-1)^k \sin ^{2m} \left( \frac{k \pi }{2n} \right) = 2 S (m,n) - S(m,2n). \end{aligned}$$
(4.6)

By adapting the proof of Theorem 4.1, (4.6) can be generalized to

$$\begin{aligned} \sum _{k=0}^{2^r n-1} \sin ^{2m} \left( \frac{k \pi }{2^r n} \right) \prod _{i=0}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) = 2 S(m,n)-S(m,2n). \end{aligned}$$
(4.7)

It should be noted that both (4.3) and (4.7) vanish when \(m<n\). Moreover, they can be generalized further as exemplified by the following theorem.

Theorem 4.2

For a positive integer r, and any odd integer p, one finds that

$$\begin{aligned} \sum _{k=0}^{2^r p n-1} \cos ^{2m} \left( \frac{k \pi }{2^r p n} \right) \prod _{i=0}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) = 2 C(m, pn)- C(m,2pn) \end{aligned}$$
(4.8)

and

$$\begin{aligned} \sum _{k=0}^{2^r p n-1} \sin ^{2m} \left( \frac{k \pi }{2^r p n} \right) \prod _{i=0}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) = 2 S(m,pn)- S(m,2pn). \end{aligned}$$
(4.9)

Proof

To prove the results for these basic trigonometric power sums, we make use of (4.4) once again. Thus, they can be expressed as

$$\begin{aligned} \sum _{k=0}^{2^r p n-1} \left\{ \begin{matrix}\cos ^{2m} \\ \sin ^{2m} \end{matrix} \right\} \left( \frac{k \pi }{2^r p n} \right) \prod _{i=0}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) = \sum _{k=0,2,4,\dots }^{2^r p n-2} \left\{ \begin{matrix} \cos ^{2m} \\ \sin ^{2m} \end{matrix} \right\} \left( \frac{k \pi }{2^r p n}\right) \prod _{i=1}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) . \end{aligned}$$

Replacing k/2 by k and i by \(i + 1\) on the rhs yields the \(r-1\) versions of (4.8) and (4.9). We continue the process of applying (4.4) and replacing k/2 by k and i by \(i + 1\) until we reach either (4.1) or (4.6) with pn instead of n. \(\square \)

On a final note, when (2.1) and (2.2) are introduced into (4.8) and (4.9), respectively, we find that the isolated binomial terms cancel and that only the sums contribute. Hence for \(m<pn\), (4.8) and (4.9) vanish, while for \(m\geqslant pn\), we arrive at

$$\begin{aligned}&\sum _{k=0}^{2^r p n-1} \cos ^{2m} \left( \frac{k \pi }{2^r p n} \right) \prod _{i=0}^{r-1} \cos \left( \frac{k \pi }{2^i} \right) \\&\quad = 2^{2-2m} pn \left( \sum _{k=1}^{\lfloor m/pn \rfloor } \left( {\begin{array}{c}2m\\ m-kpn\end{array}}\right) -\sum _{k=1}^{\lfloor m/2pn \rfloor } \left( {\begin{array}{c}2m\\ m-2kpn\end{array}}\right) \right) \end{aligned}$$

and

$$\begin{aligned} \sum _{k=0}^{2^r p n-1} \sin ^{2m} \left( \frac{k \pi }{2^r p n} \right) \prod _{i=0}^{r-1} \cos \left( \frac{k \pi }{2^i} \right)= & {} 2^{2-2m} pn \left( \sum _{k=1}^{\lfloor m/pn \rfloor } (-1)^{k pn}\left( {\begin{array}{c}2m\\ m-kpn\end{array}}\right) \right. \nonumber \\{} & {} \left. - \sum _{k=1}^{\lfloor m/2pn \rfloor } \left( {\begin{array}{c}2m\\ m-2kpn\end{array}}\right) \right) . \end{aligned}$$

5 Conclusion

This article has developed the results in [12] further in different directions. It is hoped that the various extensions and generalizations presented here will enable more sophisticated basic trigonometric power sums to be studied in the future.