Need to figure out a formula that calculates -1,-1,+1,+1,-1,-1,+1,+1

  • Context: Undergrad 
  • Thread starter Thread starter mesa
  • Start date Start date
  • Tags Tags
    Figure Formula
Click For Summary

Discussion Overview

The discussion revolves around finding a formula to generate the sequence -1, -1, +1, +1, -1, -1, +1, +1, ... for a given value of n, focusing on non-piecewise solutions. Participants explore various mathematical approaches, including trigonometric functions and complex exponentials.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant proposes the formula (-1)^[2n/3] but expresses dissatisfaction with using the greatest integer function.
  • Another participant suggests using the product of cosines: cos(n × ∏)cos((n-1) × ∏)..., but notes that the notation is not set up correctly.
  • Two participants mention that the sequence has a period of 4 and can be represented as a discrete Fourier series, providing the formula and coefficients for calculation.
  • One participant introduces the expression i^{(n)(n+1)} as a potential solution, which is met with positive feedback from others.
  • Another participant suggests using trigonometric functions, specifically \sqrt{2}\cos\left(\frac{\pi}{4} + \frac{n\pi}{2}\right), to achieve a periodic sequence without using complex numbers.
  • A different approach is proposed with the formula cos(n × π/2 + π) + sin(n × π/2 + π).

Areas of Agreement / Disagreement

Participants express various approaches and solutions, but no consensus is reached on a single formula. Multiple competing views and methods remain in the discussion.

Contextual Notes

Some participants acknowledge the complexity of their proposed solutions and the need for further clarification on certain mathematical concepts, indicating potential limitations in understanding or application.

mesa
Gold Member
Messages
694
Reaction score
36
So I need a formula that calculates -1,-1,+1,+1,-1,-1,+1,+1,... for a value of n that is not a piece wise.

So far I have come up with (-1)^[2n/3] but I don't like using greatest integer

I also did:
[cos(n × ∏)]!
The notation is not setup correctly and anyone that knows how to do it proper let me know. It is supposed to function like this:

cos(n∏)cos((n-1)∏)cos((n-2)∏)cos((n-3)∏)... until cos((n-n)∏)

I have dug in algebraically but don't think there is a solution, anyone have any thoughts on this?
 
Mathematics news on Phys.org
-cos(n*pi/2) --> -1, 0, 1, 0 ...
-sin(n*pi/2) --> 0, -1, 0, 1 ...
 
The period for your sequence is 4, so it is represented as a discrete Fourier series:
[tex] x_n = \sum_{m = 0}^{3}{a_{m} \, \exp \left(\frac{2 \pi i \, m \, n}{4} \right)},[/tex]
where the coefficients are found from:
[tex] a_{m} = \frac{1}{4} \, \sum_{n = 0}^{3}{x_{n} \, \exp \left(-\frac{2 \pi i \, m \, n}{4} \right)}[/tex]

Do the calculation by using [itex]x_0 = x_1 = -1, x_2 = x_3 = +1[/itex] for [itex]a_{0,1,2,3}[/itex], and express the complex exponentials via trigonometric functions through the Euler identity:
[tex] e^{i \alpha} = \cos \alpha + i \sin \alpha[/tex]
 
Dickfore said:
The period for your sequence is 4, so it is represented as a discrete Fourier series:
[tex] x_n = \sum_{m = 0}^{3}{a_{m} \, \exp \left(\frac{2 \pi i \, m \, n}{4} \right)},[/tex]
where the coefficients are found from:
[tex] a_{m} = \frac{1}{4} \, \sum_{n = 0}^{3}{x_{n} \, \exp \left(-\frac{2 \pi i \, m \, n}{4} \right)}[/tex]

Do the calculation by using [itex]x_0 = x_1 = -1, x_2 = x_3 = +1[/itex] for [itex]a_{0,1,2,3}[/itex], and express the complex exponentials via trigonometric functions through the Euler identity:
[tex] e^{i \alpha} = \cos \alpha + i \sin \alpha[/tex]

I am not familiar with this. What does it do?
It looks complex.
 
[tex] i^{(n)(n+1)}[/tex]
 
coolul007 said:
[tex] i^{(n)(n+1)}[/tex]

Nice and simple.:approve:
 
nice solution, need to mention for all n>0.
 
coolul007 said:
[tex] i^{(n)(n+1)}[/tex]

That's awesome :)
I played with [tex]i[/tex] but gave up on it (apparently too quickly!)
Very simple solution
 
You can usually get sin or cos to get you a periodic sequence nicely, especially if you don't want to use i, so here's one more way:[tex]\sqrt{2}\cos\left(\frac{\pi}{4} + \frac{n\pi}{2}\right)[/tex]
 
  • #10
or my solution: cos(n*pi/2 + pi) + sin(n*pi/2 + pi)
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 55 ·
2
Replies
55
Views
7K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K