Could someone explain partition (number theory) to me.

123 Views Asked by At

Hello I am a 15 year old taking gcse maths and further maths and computer science. I need to know about partition of numbers for an algorithm that i am working on. However, partition is degree level maths and not something that i understand at all. I would really appreciate if someone could explain it to me in a easier to understand way. Want i want to achieve is where the input is a number between 1 and 200 and i want to output the number of possible shapes it can form. For example i want to make a hypothetical staircase where each step must be lower than the one above it and at least 2 steps must be made. For example, if the number inputted is 3 then the output should be 1 because it can only form one shape, 2 in the first step and one in the second.

However if 5 was inputted then it should output 2 because it can form 4 in the first column and 1 in the second column but can also form 3 in the first column and 2 in the second column.