Math Is Fun Forum

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

You are not logged in.

#26 2012-09-15 03:14:44

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#27 2012-09-15 03:31:21

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Any recommendations?

Wikipedia provides this program:

 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'
I'm not crazy, my mother had me tested.

Offline

#28 2012-09-15 05:09:23

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

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

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

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-15 17: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'
I'm not crazy, my mother had me tested.

Offline

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

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#31 2012-09-15 18:42:26

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

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'
I'm not crazy, my mother had me tested.

Offline

#32 2012-09-17 16:48:13

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

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'
I'm not crazy, my mother had me tested.

Offline

#33 2012-09-17 22:18:37

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

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

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

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'
I'm not crazy, my mother had me tested.

Offline

#35 2012-09-18 06:21:26

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

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

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

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'
I'm not crazy, my mother had me tested.

Offline

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

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

Re: Any recommendations?

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


“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

#38 2012-09-19 02:06:53

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Any recommendations?

Hi all;

That is close.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#39 2012-09-19 02:20:54

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

Re: Any recommendations?

How close?


“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

#40 2012-09-19 02:24:56

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Any recommendations?

Pretty close...


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#41 2012-09-19 02:26:55

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

Re: Any recommendations?

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


“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

#42 2012-09-19 02:34:04

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB