You are not logged in.

- Topics: Active | Unanswered

**Dab Alex****Guest**

I have a problem I need to solve so I'd need an answer or a way to solve it.

I need to find out the number of combinations of 6 numbers from 49 numbers. The tricky part (for me )is that I want to exclude the combinations of numbers that are in sequence of minimum 3 meaning:

I want to exclude results like {1,2,3,4,5,6} or like {1,2,3,9,12,14} or {1,2,3,4,6,8} so on....

Thank you!

**Dab Alex****Guest**

I forgot to mention.... without repetitions and order is not important

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

Hi;

If order does not count then doesn't {2,46,31,1,5,3} have to excluded? There is a {1,2,3} in there.

*Last edited by bobbym (2013-02-19 14:53:23)*

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**Dab Alex****Guest**

I mean that the sequence of consecutive numbers must not be contained in the result so this result {2,46,31,1,5,3} must also be excluded.

I specified that order is not important because no. of combinations if order is important is 1.00683475e+10 and if it isn't no. of combinations is 13983816

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

Hi;

Yes, you are correct there are 10068347520 permutations and only 13983816 combinations.

I think I have enough to start working on it, thanks.

I am getting that 13316842 out of 13983816 do not have 3 or more numbers in sequence. This agrees well with simulations.

*Last edited by bobbym (2013-02-21 04:50:49)*

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

I think the reccurence is:

A(n,k)=A(n-3,k-2)+A(n-2,k-1)+A(n-1,k), n>3, with the appropriate starting conditions.

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

Hmmmm? Are you sure?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

Preety much.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

What are your initial conditions?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

A(n,k) is 0 for n<=0, except A(0,0)=1.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

You also did not define n or k. What are they?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

Numbers, of course.

Joke aside, n is how many numbers we choose from and k is how many numbers we choose.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

k is how many numbers we choose.

You are saying n=6 and k is the number of consecutives?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

No. n=49 and k=6.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

Did you check it by actually running the recurrence? Does it get my answer?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

Hi bobbym

Sorry. Take A(0,1)=1 as well.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

Hi;

The same question as the last post. Did you try it?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

I'm calculating it. It will take a while.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

That is like music to my ears!

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

Do you think there is a way to speed it up?

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

I do not know what you are doing, so how can I say.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

I am just running the recurrence.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

That is what I mean. In Maxima?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,015

Yes.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,175

Well, when I ask this question the kaboobly doo will hit the fan. Where does it come from?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**