1
$\begingroup$

If we split any integer number to a sum of positive integers and we look at the sums where the difference between the two highest different numbers is 1, find the function that returns how many sums like that are they for any integer.
For example, Look at the number 5. 5 written as the following sums:

  • 1 + 1 + 1 + 1 + 1

  • 2 + 1 + 1 + 1

  • 2 + 2 + 1

  • 3 + 2

  • 4 + 1

In the bold sums, the difference between the two highest different numbers is 1, and the function I'm looking for will return 3.

Can you help me find this function?
Thanks for your help.

| cite | improve this question | | | | |
$\endgroup$
  • $\begingroup$ This appears to be equal to OEIS A083751. $\endgroup$ – Benedict W. J. Irwin Feb 28 '18 at 18:04
1
$\begingroup$

The sequence $\{a_n\}_{n>0}=[0,0,1,1,3,3,6,7,\dots].\;$ We have $a(n) = A083751(n+1)\;$ and also $a(n) = A002865(n+1)-1.\;$ Now $A002865(n)$ is also the numer of partitions of $n-1$ such that the least part occurs exactly once. So we start with such a partition of $n$ and look at the conjugate partition which now has the difference between the largest and the next largest part being $1$. The only exception is the partition with only one part which is the reason for the $-1$.

One generating function for A002865 is $\sum_{n=0}^\infty A002865(n) = \prod_{k>1} (1-x^k)^{-1}.$ Other results are given the the OEIS entry. For example $a_n\! =\! p_{n+1}\!-\!p_n\!-\!1$ where $p_n$ is the number of partitions of $n$.

| cite | improve this answer | | | | |
$\endgroup$
  • $\begingroup$ I'm amazed that you found it, but does it have a function or just a template? $\endgroup$ – Ziv Sdeor Feb 28 '18 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.