# Sequence Problem

1. Jun 13, 2007

### Kopake

I was wondering, is it possible to find an explicit sequence for: 1, 1, 2, 2, 3, 3, 4 ,4 ,5 ,5 ,6 ,6 etc.
without using the greatest integer function, or a recurrency formula? Any help would be appreciated.

2. Jun 13, 2007

### ice109

whats wrong with recurrence?

3. Jun 13, 2007

### Kopake

nothing wrong with recurrence, its just that my professor said its possible to find a_n without using it and I can't figure it out

4. Jun 13, 2007

### ice109

are you in calc 2?

5. Jun 13, 2007

### smallphi

The odd terms are (n+1)/2, n = 1, 3, 5, 7, ....
The even terms are n/2, n = 2, 4, 6, 8, ....

All you have to do is to figure out how to alternate between the two functions and that can be achived by using the alternating (-1)^n

To warm up, figure out how to describe the sequence
a, b, a, b, a, b, a, b, ....
using the alternating (-1)^n.

After you figure that, you can just plug in the two formulas from your original sequence instead of a, b.

6. Jun 13, 2007

### ice109

oooooooooooooooooooooooooooooo

7. Jun 13, 2007

### Kopake

yep, I'm currently in calc 2, and thanks a bunch smallphi!

8. Jun 14, 2007

### ice109

both of those series yield even numbers

9. Jun 14, 2007

### JohnDuck

Eh? Look again.

10. Jun 14, 2007

### ice109

what? for n=1,3,5,7,9 the first sequence yields even numbers.
for n=2,4,6,8,10 the second sequence yields even numbers?

11. Jun 14, 2007

### ktoz

Sloan's is your friend

Many possibles http://www.research.att.com/~njas/sequences/?q=1%2C1%2C2%2C2%2C3%2C3%2C4%2C4%2C5%2C5%2C6%2C6%2C7%2C7%2C8%2C8&language=english&go=Search" [Broken]

Last edited by a moderator: May 2, 2017
12. Jun 14, 2007

### Office_Shredder

Staff Emeritus
For the odd numbers:
1 -> (1+1)/2 = 1
3 -> (3+1)/2 = 2
5 -> (5+1)/2 = 3

Even numbers:

2 -> 2/2 = 1
4 -> 4/2 = 2
6 -> 6/2 = 3

13. Jun 14, 2007

### ktoz

Not sure if the floor function is legal for your purposes but if so, this works

m = {1, 2, 3, 4, ...}

$$a = \lfloor \frac{m}{2} \rfloor + 1$$

Oops! Sorry didn't see this on first read: "without using the greatest integer function"

Last edited: Jun 14, 2007
14. Jun 14, 2007

### ktoz

This works without using the floor or ceil functions

m = {0, 1, 2, 3, ... }

$$a = \frac{2 * m + (-1) ^ m - 1}{4}$$

15. Jun 17, 2007

### ktoz

In an earlier post, I came up with this to answer the OP

m = {0, 1, 2, 3, ... }

$$a = \frac{2 * m + (-1) ^ m - 1}{4}$$

But I was wondering whether this can be extended to produce sequences with repeating terms of width n? The $$-1^m$$ trick doesn't seem to help.

It's trivially easy to do it with floor

m = {0, 1, 2, ... }
n = {1, 2, 3, ...}

$$a_m = \lfloor \frac{m}{n} \rfloor$$

But what about without floor?