10
$\begingroup$

I've been playing with periodic sequences of 1s and -1s lately. This is what I came up with: \begin{eqnarray*} -(-1)^n& = &1, -1, 1, -1,\ldots\quad\textrm{(Period 2)}\\ \left(-(-1)^n\right)^{\frac{n+2}{2}} & = &1, 1, 1, -1, 1, 1, 1, -1,\ldots\quad\textrm{(Period 4)}\\ \left(\left(-(-1)^n\right)^{\frac{n+2}{2}}\right)^{\frac{n+4}{4}}& = &1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, \ldots\quad\textrm{(Period 8)} \end{eqnarray*} One can easily find a similar formula for a periodic sequence with period $ 2^n, n\in\mathbb{N} $. I also found a formula: $$ (-1)^{2 \sin\left(\frac{(2n-1)\pi}{6}\right)}, $$ which gives a sequence $ -1, 1, -1, -1, 1, -1,\ldots $ with period 3.

My question is: Is there a formula for a periodic sequence of 1s and -1s with period 5? If there is, what is it?

I know about this formula for a periodic zero and one sequence with period $ N $: $$ \sum\limits_{k = 1}^N\cos\left(-2\pi\frac{n(k-1)}{N}\right)/N = 0, 0, 0, \ldots, 1. $$ However, it requires to sum up $ N $ expressions to count the $ n\textrm{th} $ term, which is why I don't like it. I would also like the formula not to contain functions like floor or modulus.

$\endgroup$
7
  • 1
    $\begingroup$ Wouldn't at this point the more natural question be finding a formula with period $3$ without using an "advanced" function like the sine? $\endgroup$
    – GDumphart
    Dec 10, 2014 at 15:07
  • $\begingroup$ Also, must the formula with a period $n$ produce $n-1$ positive 1's followed by a single negative 1 before the pattern repeats? $\endgroup$ Dec 10, 2014 at 15:14
  • $\begingroup$ @GDumphart I thought about this too, but I don't think it exists. "Less advanced" functions (polynomials) give a sequence of even and odd numbers with period $ 2^n $, don't they? $\endgroup$
    – Mikulas
    Dec 10, 2014 at 15:20
  • $\begingroup$ @teadawg1337 Not necassarily. It can by any sequence of positive and negative 1's with period 5. $\endgroup$
    – Mikulas
    Dec 10, 2014 at 15:22
  • $\begingroup$ In that case, my topic here gives two different examples with period 4. Perhaps that can help get the ball rolling $\endgroup$ Dec 10, 2014 at 15:26

3 Answers 3

6
$\begingroup$

We have $$ \frac{4\cos\left(\frac{2\pi k}5\right)+4\cos\left(\frac{4\pi k}5\right)-3}5= \left\{\begin{array}{} -1&\text{if }k\not\equiv0\pmod5\\ +1&\text{if }k\equiv0\pmod5\\ \end{array}\right.\tag{1} $$


Explanation

The roots of $z^5-1$ are $z=e^{2\pi ik/5}$ for $k\in\{0,1,2,3,4\}$. Vieta says that the coefficient of $z^4$ in $z^5-1$ the sum of the roots of $z^5-1$. That is, the sum of the roots is $0$. Taking the real part of the roots yields $$ 1+\cos\left(\frac{2\pi}5\right)+\cos\left(\frac{4\pi}5\right)+\cos\left(\frac{6\pi}5\right)+\cos\left(\frac{8\pi}5\right)=0\tag{2} $$ When $k\not\equiv0\pmod5$, $k$ is invertible $\bmod5$. Therefore, $$ \left(\cos\left(\frac{2\pi k}5\right),\cos\left(\frac{4\pi k}5\right),\cos\left(\frac{6\pi k}5\right),\cos\left(\frac{8\pi k}5\right)\right)\tag{3} $$ is a permutation of $$ \left(\cos\left(\frac{2\pi}5\right),\cos\left(\frac{4\pi}5\right),\cos\left(\frac{6\pi}5\right),\cos\left(\frac{8\pi}5\right)\right)\tag{4} $$ Therefore, $$ 1+\cos\left(\frac{2\pi k}5\right)+\cos\left(\frac{4\pi k}5\right)+\cos\left(\frac{6\pi k}5\right)+\cos\left(\frac{8\pi k}5\right)=0\tag{5} $$ when $k\not\equiv0\pmod5$. When $k\equiv0\pmod5$, $$ 1+\cos\left(\frac{2\pi k}5\right)+\cos\left(\frac{4\pi k}5\right)+\cos\left(\frac{6\pi k}5\right)+\cos\left(\frac{8\pi k}5\right)=5\tag{6} $$ Since $\cos(x)$ is an even function with period $2\pi$, $(5)$ and $(6)$ become $$ 1+2\cos\left(\frac{2\pi k}5\right)+2\cos\left(\frac{4\pi k}5\right) =\left\{\begin{array}{} 0&\text{if }k\not\equiv0\pmod5\\ 5&\text{if }k\equiv0\pmod5\\ \end{array}\right.\tag{7} $$ Equation $(1)$ is simply a scaled and translated version of $(7)$.

$\endgroup$
5
  • $\begingroup$ I will continue to think on this. $\endgroup$
    – robjohn
    Dec 10, 2014 at 15:49
  • $\begingroup$ Thank you! But why do $ \cos\left(\frac{2\pi k}{5}\right) $ and $ \cos\left(\frac{4\pi k}{5}\right) $ sum up so nicely? $\endgroup$
    – Mikulas
    Dec 10, 2014 at 15:58
  • $\begingroup$ @Mikulas: I have added an explanation of that. $\endgroup$
    – robjohn
    Dec 10, 2014 at 16:27
  • $\begingroup$ You probably want $=-1$ in (1) to make it an equation. Well done $\endgroup$ Dec 10, 2014 at 16:33
  • $\begingroup$ @RossMillikan: thanks; fixed. $\endgroup$
    – robjohn
    Dec 10, 2014 at 16:43
1
$\begingroup$

Surprisingly, you can use Fibonacci numbers and its generalizations for periods $3,4,5,\dots$

Period 3. Fibonacci numbers $F_n= 1, 1, \color{blue}2, 3, 5, \color{blue}8, 13, 21, \color{blue}{34},\dots$

$$A_n = -(-1)^{F_n}=1, 1, -1, 1, 1, -1,\dots$$

Period 4. Tribonacci numbers $T_n = 1, 1, \color{blue}{2, 4}, 7, 13, \color{blue}{24, 44}, 81, 149, \color{blue}{274, 504},\dots$

$$B_n = -(-1)^{T_n}=1, 1, -1, -1, 1, 1, -1, -1\dots$$

Period 5. Tetranacci numbers $W_n = 1, 1, 1, 1, \color{blue}4, 7, 13, 25, 49, \color{blue}{94}, 181, 349, 673, 1297, \color{blue}{2500},\dots$

$$C_n = -(-1)^{W_n}=1, 1, 1, 1, -1, 1, 1, 1, 1, -1,\dots$$

and so on.

$\endgroup$
2
  • $\begingroup$ Nice approach, +1 $\endgroup$
    – Yuriy S
    Dec 14, 2016 at 11:23
  • $\begingroup$ A closed-form for the tribonacci numbers in terms of binomial coefficients can be found here. $\endgroup$ Dec 14, 2016 at 12:51
0
$\begingroup$

This is close:

${|\cos{\frac{\pi*x}{5}-\frac{\pi}{2}}|}^{0.0001}$

$\endgroup$
2
  • $\begingroup$ Your formula gives just numbers close to 1. $\endgroup$
    – Mikulas
    Dec 10, 2014 at 15:45
  • $\begingroup$ @Mikulas , I know, that's the problem, that's why I said it was close $\endgroup$
    – Kurtbusch
    Dec 12, 2014 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.