How many ways can you express n as the sum of positive integers?

In summary: I had thought of the partitions of 4 as 2+2, 2+1+1, and 1+1+1+1 but not 4 itself.In summary, the question is how many ways can a positive integer n be expressed as the sum of positive integers, where order of addition does not matter. The function f(x) is used to determine this, with f(1)=1, f(2)=2, f(3)=3, f(4)=5, f(5)=7. However, there is no simple pattern and the partition function is needed to accurately calculate the number of ways. Euler's expression can be used, but there is no known closed form for the partition function
  • #1
ehrenfest
2,020
1
[SOLVED] expressions of integers

Homework Statement


Let n be a positive integer. How many ways can you express a as the sum of positive integers? Order of addition does not matter.

EDIT: change "a" to "n" in the second sentence

Homework Equations


The Attempt at a Solution


Let f(x) be the function that gives the number of ways you can express x as the sum of positive integers? Order of addition does not matter.
f(1)=1
f(2)=2
f(3)=3
f(4)=5
f(5)=7

I do not see the pattern. I was hoping for Fibonacci numbers...
 
Last edited:
Physics news on Phys.org
  • #2
ehrenfest said:

Homework Statement


Let n be a positive integer. How many ways can you express a as the sum of positive integers? Order of addition does not matter.
How is n related to a?
 
  • #3
Assuming that 'a' is an 'n', then the OP should read up on the partition function.
 
  • #4
looks to me like a recursive formula. "2" can be written as a sum of integers just one way: 1+ 1. Obviously 3 can be written 2+ 1 or 1+ 2 and then the 2 in that can be written in one way: 2+ 2(1)= 4. 3 can be written is 3+ 1 and 1+ 3 and, in addition to that 3 can be written if 4 ways: 2+ 2(4)= 10. In general, if k can be written in n(k) ways, then k+ 1 can be written as (k)+ 1 or 1+ (k), which is 2 ways and then the (k) can be written in n(k) ways: n(k+1)= 2+ 2n(k). Once you found the formula from that you can prove it by induction.
 
  • #5
That misses some of the partitions, e.g. 4=2+2 cannot be obtained from the partitions of 3. Also, judging by the OP's calculations, I don't think he's paying attention to the order of the terms in the partition, i.e. 1+(k) and (k)+1 count as one.

As far as I'm aware, there is no nice closed form for the partition function in general, although there are formulas for particular types of partitions. A good way to work with partitions is via generating series (a good book on these matters is Generatingfunctionology, available for free online). For example, here's an expression due to Euler (IIRC):

[tex]\sum_{n \geq 0} f(n) x^n = \prod_{n \geq 1} \frac{1}{(1-x^n)}[/tex]
 
  • #6
morphism said:
As far as I'm aware, there is no nice closed form for the partition function in general,

No wonder I was having trouble with it.
 

What are integers?

Integers are whole numbers, both positive and negative, including zero.

What is an expression of integers?

An expression of integers is a mathematical statement that includes one or more integers and mathematical operations, such as addition, subtraction, multiplication, or division.

How do you evaluate an expression of integers?

To evaluate an expression of integers, you follow the order of operations, which is parentheses, exponents, multiplication and division from left to right, and then addition and subtraction from left to right.

What is the difference between an expression and an equation?

An expression is a mathematical statement that represents a value, while an equation is a mathematical statement that shows the equality between two expressions.

What are some real-life examples of expressions of integers?

Some examples of expressions of integers in real life include calculating the cost of items on a shopping list, determining the change you will receive from a purchase, and calculating the distance between two locations on a map.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
13
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
300
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
612
  • Calculus and Beyond Homework Help
Replies
1
Views
330
  • Calculus and Beyond Homework Help
Replies
22
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
Back
Top