Solving Sequence Problem: Explicit Sequence for 1, 1, 2, 2...

  • Context: Undergrad 
  • Thread starter Thread starter Kopake
  • Start date Start date
  • Tags Tags
    Sequence
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
14 replies · 3K views
Kopake
Messages
3
Reaction score
0
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.
 
Mathematics news on Phys.org
whats wrong with recurrence?
 
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
 
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.
 
smallphi said:
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.

oooooooooooooooooooooooooooooo
 
yep, I'm currently in calc 2, and thanks a bunch smallphi!
 
smallphi said:
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.

both of those series yield even numbers
 
ice109 said:
both of those series yield even numbers

Eh? Look again.
 
JohnDuck said:
Eh? Look again.

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?
 
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"
 
Last edited by a moderator:
ice109 said:
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?

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
 
Not sure if the floor function is legal for your purposes but if so, this works

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

[tex]a = \lfloor \frac{m}{2} \rfloor + 1[/tex]

Added later:

Oops! Sorry didn't see this on first read: "without using the greatest integer function"
 
Last edited:
This works without using the floor or ceil functions

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

[tex]a = \frac{2 * m + (-1) ^ m - 1}{4}[/tex]
 
In an earlier post, I came up with this to answer the OP

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

[tex]a = \frac{2 * m + (-1) ^ m - 1}{4}[/tex]

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

It's trivially easy to do it with floor

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

[tex]a_m = \lfloor \frac{m}{n} \rfloor[/tex]

But what about without floor?