Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

## #26 2012-09-16 01:14:44

bobbym

Online

### Re: Any recommendations?

Let's say we want the 8th unrestricted partition or p(8).

We generate some generalized pentagonal numbers first. We use:

with n = -4, -3, -2, -1, 0, 1, 2, 3, 4 why we go from -4 to 4 will be clearer when you do some these yourself. Anyway, this generates the sequence

you only keep numbers whose absolute value is < 8 and do not equal 0. So the sequence becomes:

Now the absolute value of each of those numbers is subtracted from 8 to get:

p(8) = p(8-1) ± p(8-2) ± p(8-5) ± p(8-7)

that becomes

p(8) = p(7) ± p(6) ± p(3) ± p(1)

To get the correct signs instead of  ± , look at the sequence. If the number that is subtracted from 8 is positive then the ± becomes + if it is negative then it becomes negative.

In mathematics, you don't understand things. You just get used to them.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.

## #27 2012-09-16 01:31:21

Agnishom
Real Member

Offline

### Re: Any recommendations?

Wikipedia provides this program:

#### Code:

``` pentagonal = lambda n : n*(3*n-1)/2

def generalised_pentagonal(n): # 0, 1, -1, 2, -2
if n < 0: return 0
if n%2 == 0: return pentagonal(n/2+1)
else: return pentagonal(-(n/2+1))

pt = [1]
for n in range (1, 1000+1):
r = 0
f = -1
i = 0
while 1:
k = generalised_pentagonal(i)
if k > n:
break
if i%2==0: f = -f
r += f*pt[n - k]
i += 1
pt.append(r)

print pt```

I just replaced the condition of the loop with what I require
I got the answer within a few seconds

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'The whole person changes, why can't a habit?' -Alokananda

## #28 2012-09-16 03:09:23

bobbym

Online

### Re: Any recommendations?

Hi;

Did you understand what I did in post #26?

In mathematics, you don't understand things. You just get used to them.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.

## #29 2012-09-16 15:15:57

Agnishom
Real Member

Offline

### Re: Any recommendations?

Yes!
1. To calculate a partition, we have to calculate(some of) the previous partitions.
2. We need to know that p(1) = 1

I can understand how we use it, but not the principle behind it

Last edited by Agnishom (2012-09-16 15:17:43)

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'The whole person changes, why can't a habit?' -Alokananda

## #30 2012-09-16 15:24:00

bobbym

Online

### Re: Any recommendations?

Hi Agnishom;

Have you seen my signature? That is from a top mathematician. If he has trouble understanding some things what can be expected of us? Fortunately, if you understand the mechanics of a math technique or algorithm you can then use it. I gave you the how it works stuff, the why it works is much tougher and I do not fully understand it.

Incidentally, I only showed this rather inefficient technique as a means to solve that specific problem.

In mathematics, you don't understand things. You just get used to them.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.

## #31 2012-09-16 16:42:26

Agnishom
Real Member

Offline

### Re: Any recommendations?

Grand Idea!

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'The whole person changes, why can't a habit?' -Alokananda

## #32 2012-09-18 14:48:13

Agnishom
Real Member

Offline

### Re: Any recommendations?

By the Way, Once upon a time you had a signature about wastage of time and money. Would you please explain that?

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'The whole person changes, why can't a habit?' -Alokananda

## #33 2012-09-18 20:18:37

bobbym

Online

### Re: Any recommendations?

Hi Agnishom;

I do not remember that one, can you give me a hint?

In mathematics, you don't understand things. You just get used to them.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.

## #34 2012-09-18 22:28:52

Agnishom
Real Member

Offline

### Re: Any recommendations?

Something like this:
How often do I see money and time being wasted..............
Then You told something about calculations....

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'The whole person changes, why can't a habit?' -Alokananda

## #35 2012-09-19 04:21:26

bobbym

Online

### Re: Any recommendations?

Hi Agnishom;

That is very good that you remember that much. I wished I could remember the
entire quote and who said it.  If I do I will explain.

In mathematics, you don't understand things. You just get used to them.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.

## #36 2012-09-19 22:10:04

Agnishom
Real Member

Offline

### Re: Any recommendations?

At that time I never understood what they were as I did not have the concept of Signatures. They seemed very confusing to me

Big discoveries are protected by public incredulity.

What is the meaning of public incredulity?

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'The whole person changes, why can't a habit?' -Alokananda

## #37 2012-09-19 23:15:31

anonimnystefy
Real Member

Online

### Re: Any recommendations?

It means, that big discoveries are looked at with disbelief by the general public.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

## #38 2012-09-20 00:06:53

bobbym

Online

### Re: Any recommendations?

Hi all;

That is close.

In mathematics, you don't understand things. You just get used to them.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.

## #39 2012-09-20 00:20:54

anonimnystefy
Real Member

Online

### Re: Any recommendations?

How close?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

## #40 2012-09-20 00:24:56

bobbym

Online

### Re: Any recommendations?

Pretty close...

In mathematics, you don't understand things. You just get used to them.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.

## #41 2012-09-20 00:26:55

anonimnystefy
Real Member

Online

### Re: Any recommendations?

Where do the La***ta files come in?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

## #42 2012-09-20 00:34:04

bobbym

Online

### Re: Any recommendations?

There is a difference between how Marshall McLuhan and I interpret that quote.
I did not know him personally or attend the parties he did or hang in his social set.
Therefore I do not know what secrets he was exposed to.

In mathematics, you don't understand things. You just get used to them.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.