0

But when I see that it was closed because of being unclear I decided to make it better and ask again.

First I want to give a link to make it more clear first what is alternating series. What you see is that you can generate $1,-1,1,-1,\dots$ using this formula: $(-1)^n$.

Now if you want to have two positives and two negatives together $\{1,1,-1,-1,1,1,-1,-1,...\}$ you can explain it with floor function $(-1)^{\lfloor \frac{n}{2} \rfloor}$ or you can use triangular numbers: $(-1)^{\frac{n(n+1)}{2}}$. See other possible ways here and here.

Now when we want to have three positives and three negatives together:$\{1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,...\}$ We could explain with floor function: $(-1)^{\lfloor \frac{n}{3} \rfloor}$ but because of we didn't learn floor function yet we don't have the permission to use it.

Also we didn't learn trigonometry then we cannot use it either. (Here is a solution using trigonometry may help.) Note that we want a single formula solving it with different formula is very easy.

Now what I want is a simple solution using simple algebra and without using floor function or trigonometry. This is the main sequence that if we find the previous sequence will solved easily.

$$A_n=\{3,7,11,-15,-19,-23,...\}$$

We should only add $4n+3$ next to it.

The news that I should tell you is that our teacher told us is that using absolouting value is not allowed then we can know $sign$ is also not allowed our teacher told us it should be in the form of an algebric formula like the other one that we used for two negative once and two positive once. He told us for solving this we should use degree $3$ algebra but how?

Taha Akbari
  • 3,559
  • The $n$th sign is the sign of $$\sum_k\left(3{n\choose2k+1}-{n\choose2k}\right)(-1)^k3^k.$$ – Did Jun 29 '16 at 17:14
  • Can you explain more in an answer,please? – Taha Akbari Jun 29 '16 at 17:59
  • This is based on the observation that $$\sin\left(n\frac\pi3-\frac\pi6\right)$$ has period $6$ and is successively $\frac1{\sqrt2}$, $1$, $\frac1{\sqrt2}$, $-\frac1{\sqrt2}$, $-1$, $-\frac1{\sqrt2}$, and so on. Now, $$\sin\left(n\frac{\pi}{3}-\frac{\pi}{6}\right)=\Im\left(e^{-i\pi/6}(e^{i\pi/3})^n\right)=\Im\left(2^{-n-1}(\sqrt3-i)(1+i\sqrt3)^n\right)$$ hence we are after the sign of the imaginary part of $$(\sqrt{3}-i){}{}{}{}{}{}{}{}{}\sum_{k}(-1)^{k}3^{k}\left({n\choose2k}+{}{}{}{}{}{}i\sqrt{3}{n\choose2k+1}\right),$$ and the rest follows. – Did Jun 30 '16 at 07:01
  • Wait, so your ultimate goal is to find a general term $a_n$ that describes elements of the sequence $A={3,7,11,-15,\dots}$? –  Jun 30 '16 at 11:24
  • @tilper Only the signs. – Did Jun 30 '16 at 12:30
  • "I want a simple answer you know I am grade 8 don't use trigonometry or floor function." Note that the formula in my first comment does not use trigonometry, only its proof does. – Did Jun 30 '16 at 12:32
  • @Did not sure if you thought I was asking you, but I was asking OP because it sounds like the goal is to get a term for elements of $A$ and the specific question that was asked seems like a means of achieving that goal. Wondering also if it's the only way. –  Jun 30 '16 at 12:54
  • @tilper The amplitudes are not a problem, they are simply $4n-1$ for $n\geqslant1$. But the constraints put on an admissible formula for the signs are (persistently) rather mysterious and (as often) offering a bounty seems to replace in the OP's mind the need to clarify the question (which it never does). – Did Jun 30 '16 at 13:01
  • No it isn't opinion based it is on our exersicing book. – Taha Akbari Jun 30 '16 at 13:41
  • Here is another option: The $n$th sign is the sign of the difference of integers $3A_n-B_n$ where $$A_n=\sum_k{n+1\choose 4k+2}9^k\qquad B_n=\sum_k{n+1\choose 4k}9^k.$$ For example, $$A_3=6\quad A_4=10\quad B_3=10\quad B_4=46$$ hence the third sign is $+$ and the fourth sign is $-$. – Did Jun 30 '16 at 13:53
  • @Did as you said your first comment do not use trigonometry.But I cannot understand it what is $k$?and what does it mean the $n$th sign? – Taha Akbari Jun 30 '16 at 15:48
  • What? You also exclude sums over an index $k$? And you do not see what "the $n$th sign" can refer to in the context of a sequence of $\pm1$s? To repeat, the idea is to compare $3A_n$ to $B_n$: if $3A_n>B_n$, you answer $1$ while if $3A_n<B_n$, you answer $-1$. Re sums, here is an example: $$A_{14}={15\choose2}+{15\choose6}9+{15\choose10}81+{15\choose14}729=\ldots$$ while $$B_{14}={15\choose0}+{15\choose4}9+{15\choose12}81=\ldots$$ – Did Jun 30 '16 at 16:00
  • @Did I just wanted to know what is $k$ and the $n$th sign?And I wanted to explain your first comment not the other,please. – Taha Akbari Jun 30 '16 at 16:04
  • OK, then the sum in the first comment for $n=4$ is $$\left(3{4\choose1}-{4\choose0}\right)-3\left(3{4\choose3}-{4\choose2}\right)+9\left(-{4\choose4}\right)=(3\cdot4-1)-3(3\cdot4-6)+9(-1),$$ that is $-16$, which is negative, hence the fourth term of the sequence is $-1$. – Did Jun 30 '16 at 16:09
  • Ok very nice if you want the bounty write it as an answer.The proof isn't needed. – Taha Akbari Jun 30 '16 at 16:31
  • 1
    It would have been better to make your goal clearer. – user_194421 Jul 04 '16 at 06:27
  • What do you mean it is clear. – Taha Akbari Jul 04 '16 at 06:32
  • For example make it in bold. – user_194421 Jul 04 '16 at 20:58
  • @user351579 that's a good idea. – Taha Akbari Jul 05 '16 at 05:55
  • @TahaAkbari: I couldn't resist improving your formatting. I know texting is popular with the younger generation but, when in MSE, it helps if you properly capitalize and space your post. And you got very good answers using, rather surprisingly, Fibonacci numbers. – Tito Piezas III Dec 14 '16 at 09:27

4 Answers4

7

The formula is

$$A_n=(-1)^{F_{n+1}+n}\,(4n-1)$$

with first term $A_1=3$ and where $F_n$ is the $n$th Fibonacci number. This formula involves neither $sign$ nor $floor$.

I believe you meant $4n-1$ instead of $4n+3$, since otherwise the first term would be $4+3=7$ instead of $3$.

Explanation

Fibonacci numbers are defined as follows:

  • The first and second Fibonacci numbers are both $1$
  • For $n\ge3$, the $n$th Fibonacci number equals the sum of the $(n-1)$th and $(n-2)$th Fibonacci number.

Consider that

  • $F_1$ is odd, and
  • $F_2$ is odd.

Therefore,

  • $F_3$ is even
  • $F_4$ is odd
  • $F_5$ is odd.

If this is continued, the pattern will repeat itself indefinitely after every 3 numbers:

  • $F_6$ is even
  • $F_7$ is odd
  • $F_8$ is odd, and so forth.

Expressing this in the form $F_{n+1}$, excluding $F_{0+1}$, yields

  • $F_{1+1}$ is odd
  • $F_{2+1}$ is even
  • $F_{3+1}$ is odd
  • $F_{4+1}$ is odd
  • $F_{5+1}$ is even
  • $F_{6+1}$ is odd.

Consider that

  • 1 is odd
  • 2 is even
  • 3 is odd
  • 4 is even
  • 5 is odd
  • 6 is even.

This pattern, obviously, repeat itself after every 2 numbers. Adding it to the previous in order yields

  • $F_{1+1}+1$ is even
  • $F_{2+1}+2$ is even
  • $F_{3+1}+3$ is even
  • $F_{4+1}+4$ is odd
  • $F_{5+1}+5$ is odd
  • $F_{6+1}+6$ is odd.

This pattern repeats itself after every $lcm(3,2)=6$ numbers. Then, we raise $-1$ to each term of this pattern, obtaining

  • $(-1)^{F_{1+1}+1}=1$
  • $(-1)^{F_{2+1}+2}=1$
  • $(-1)^{F_{3+1}+3}=1$
  • $(-1)^{F_{4+1}+4}=-1$
  • $(-1)^{F_{5+1}+5}=-1$
  • $(-1)^{F_{6+1}+6}=-1$

Finally, we multiply every $n$th term by $4n-1$.

  • $(-1)^{F_{1+1}+1}(4*1-1)=1*3=3$
  • $(-1)^{F_{2+1}+2}(4*2-1)=1*7=7$
  • $(-1)^{F_{3+1}+3}(4*3-1)=1*11=11$
  • $(-1)^{F_{4+1}+4}(4*4-1)=(-1)*15=-15$
  • $(-1)^{F_{5+1}+5}(4*5-1)=(-1)*19=-19$
  • $(-1)^{F_{6+1}+6}(4*6-1)=(-1)*23=-23$

The multiplication produces the desired sequence, which is $\{3,7,11,-15,-19,-23\}$.

user_194421
  • 2,291
4

Here's one function which, starting at $n=1$ produces the sequence $1,\,1,\,1,\,-1,\,-1,\,-1,\ldots$.: $$(-1)^{\left(\frac{1+\sqrt{5}}{2}\right)^{n+1}+\left(\frac{1-\sqrt{5}}{2}\right)^{n+1}+n}$$ If we're not using trigonometry or complex numbers, I suspect the techniques that I used to find this would be inscrutable, but I have detailed them below the horizontal line.


I found this by playing around with generating functions. In particular, we want $$a_{n+3}\equiv 1-a_n\pmod 2.$$ In terms of generating functions functions, if we let $A(x)=a_0+a_1x+a_2x^2+a_3x^3+\ldots$ then we get $$A\equiv x^3\left(\frac{1}{1-x}-A\right)\pmod 2$$ which solves as $$A\equiv \frac{x^3}{(1-x)(1+x^3)}\pmod 2.$$ Since we want the denominator to factor as much as possible, we subtract $0\equiv 2x^2\pmod 2$ from the appropriate place giving $$A\equiv \frac{x^3}{(1-x)(1-2x^2+x^3)}\equiv \frac{x^3}{(1-x)^2(1+x-x^2)}\pmod 2.$$ At this point, we are happy since our denominator can only have real roots, of algebraic degree $2$, so we can definitely find a closed form for the power series of the right hand side in terms of the given functions. Finding this closed form is easy if you know about generating functions, and would yield a suitable answer. One could use similar techniques to find various other similar formulae.

However, at this point, I realized that, since the recurrence relation $L_{n+2}=L_{n+1}+L_n$ has a period of $3$ mod $2$ when started with $0,\,1,\ldots$ mod $2$, we can basically build the answer off of it. In particular, the Lucas sequence starts this way and has the simple closed form $L_n=\varphi^n+(-\varphi)^{-n}$. It turns out that, if one observes the form that came out of the generating function, and matches the parities up properly, we get that, starting with $n=1$, the sequence $L_{n+1}+n$ alternates between even and odd parity every $3$ terms. Thus, we just write $(-1)^{L_{n+1}+n}$ as our answer.

If one can solve cubic and quartic equations (whose general formulae require complex numbers), then one can at least get alternations of length $5$. Solving general polynomials gives alternations of any length. However, it seems that things are doomed to get more complicated or even impossible without using trigonometry or complex numbers.

Milo Brandt
  • 60,888
1

You can find an exponent of $-1$ that fits by solving the recurrence

$$e_{n+3}=e_n+1,\\e_0=e_1=e_2=0.$$

The general solution is

$$e_n=c_0+c_1\omega^{n}+c_2\omega^{-n}+\frac n3$$ where $\omega$ is a cubic root of $1$. To get a real solution, you must have $c_2=c_1^*$.

By plugging the initial conditions, you determine the constants, giving

$$e_n=\frac{n-1}3-\frac2{3\sqrt3}\sin\left(\frac{2\pi}3(n-1)\right).$$

enter image description here


This solution directly generalizes to alternating sequences of length $k$.

0

One way would be to expand the floor function, $$a_n=\begin{cases}(-1)^\frac{n}3(4n+3)&\text{ if }n\equiv0\pmod3\\(-1)^\frac{n-1}3(4n+3)&\text{ if }n\equiv1\pmod3\\(-1)^\frac{n-2}3(4n+3)&\text{ if }n\equiv2\pmod3\end{cases}$$

GoodDeeds
  • 11,185
  • 3
  • 22
  • 42