Re: Question about integer partitions



The number should be easy to find. Try this:
Let P(n) be the number of partitions of n, for n>=1, and let P(n)=0 for
n<=0 (this last bit is just to make the formula I will provide later
simpler)

Thus, there are P(n-k) partitions with at least one partition of k
there are (n-2k) paritions with at least two partitional of k
and so on.

Thus, the total patitions of size k in the list of paritions of n are:

P(n-k) + P(n-2k) + P(n-3k) + . . .

Since P(n-jk)=0 if j>= n/k, this sum will terminate.
Any partition of n with one k will be counted exactly once, those with
two ks will be counted twice, and so on, so the double counting in the
formula seems to be exactly what you wanted to have.

.



Relevant Pages

  • (no subject)
    ... thank you very much for your detailed explanation. ... much a novice at these things. ... Although i do understand about paritions ... :'(for example you say I should partition it with two ext 3 partitions etc. ...
    (Ubuntu)
  • setting up partitions, multi users by using command line
    ... thank you very much for your detailed explanation. ... much a novice at these things. ... Although i do understand about paritions ... :'(for example you say I should partition it with two ext 3 partitions etc. ...
    (Ubuntu)
  • Re: How Can I Combine Two Partions on the Same Physical Drive?
    ... reinstall everything.... ... partition) into the maximum size possible ... Really not that complicated but i wouldn't normallly recomend it if the ... they will just merge two paritions without harming any data?!? ...
    (microsoft.public.windowsxp.general)
  • Re: Want to relocate /home partition on RH9
    ... You can use the 'e2label' command to assign a label to a partition. ... idea of a label is to allow paritions to be moved around and deleted ... > taking space from an NTFS partition and they are labeled for Linux Swap ...
    (linux.redhat.install)
  • Re: Partitioning Drives and Free Space
    ... Is it just a case of other files in other paritions "spilling over" into the system partition, or does partitioning itself use space that's basically invisible to Windows? ...
    (microsoft.public.windowsxp.basics)