Is there an expression that results in -1 or 1 for these values of n:

1 -> -1

2 -> -1

3 -> 1

4 -> 1

5 -> -1

6 -> -1

7 -> 1

8 -> 1

9 -> -1

10 -> -1

etc.

My book has something that does not work correctly.

Printable View

- October 1st 2011, 05:25 AMStuck Manexpression to result in -1 or 1
Is there an expression that results in -1 or 1 for these values of n:

1 -> -1

2 -> -1

3 -> 1

4 -> 1

5 -> -1

6 -> -1

7 -> 1

8 -> 1

9 -> -1

10 -> -1

etc.

My book has something that does not work correctly. - October 1st 2011, 05:33 AMPlatoRe: expression to result in -1 or 1
- October 1st 2011, 05:46 AMchisigmaRe: expression to result in -1 or 1
- October 1st 2011, 05:46 AMStuck ManRe: expression to result in -1 or 1
Is that often featured on calculators? I don't think I've seen it before although I've heard of it in computer languages.

- October 1st 2011, 05:54 AMPlatoRe: expression to result in -1 or 1
I know nothing about calculators, but on a CAS it is floor(x).

Look at this webpage.