In How many ways can I carry a total of n coins in my two pockets, and have the same amount in both pockets?
Shalosh B. Ekhad, Doron Zeilberger

TL;DR
This paper explores a combinatorial problem of counting ways to split n coins equally into two pockets, using generating functions and computational methods to extend previous mathematical results.
Contribution
It introduces a simple computational approach with Maple to enumerate solutions to the coin-splitting problem and related combinatorial questions, extending known results to degree 18.
Findings
Generated new sequences for the coin-splitting problem
Demonstrated the effectiveness of partial-fraction decomposition in enumeration
Extended previous mathematical results to higher degrees
Abstract
In Gert Almkvist's beautiful article, entitled "Invariants, mostly old ones", (that appeared in the Pacific Journal of Mathematics, vol. 86 (1980), pp. 1-13) he talked about a sequence of generating functions that came up in his work, that turned out to be the same as generating functions for the number of covariants of binary quadratic forms studied by Faa de Bruno, Cayley, Sylvester, and other 19th century savantes. Using a very simple-minded Maple program (that uses the partial-fraction decomposition of a rational function), we recompute them, and go all the way to degree 18. It turns out that the same method can be used to answer many other enumeration questions, including the one in the title.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Mathematical Identities · History and Theory of Mathematics · Analytic Number Theory Research
In how many ways can I carry a total of n coins in my two pockets,
and have the same amount in both pockets?
Shalosh B. EKHAD and Doron ZEILBERGER
*In fond memory of Gert Almkvist††∗ Gert Almkvist was one of the most creative and original mathematicians that we have ever met. He was known, among his friends, as “the guy who generalized a mistake of Bourbaki” [see http://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/gert.html], a master expositor (1989 Lester Ford award, joint with Bruce Berndt, and numerous articles in Swedish), the co-inventor of the Almkvist-Zeilberger algorithm, and a great authority on Calabi-Yao differential equations. In addition to his official affiliation with the University of Lund, he was the founder of the Institute of Algebraic Meditation, and many of his papers used it as his affiliation. (April 17, 1934- Nov. 24, 2018). *
Theorem 1: Let be the number of ways of having a total of coins in your two pockets (each of them either a penny, a nickel, a dime, or a quarter), so that the amounts in the pockets are identical, then
[TABLE]
[TABLE]
[TABLE]
[TABLE]
[TABLE]
[TABLE]
and
[TABLE]
[TABLE]
[TABLE]
Furthermore is a quasi-polynomial, and asymptotically,
[TABLE]
Finally
[TABLE]
1869593883482772371661260550149439038327927216816105704994593883482772371661260 5501494390383279272213031310253532475754697976920199142421364643586865809088031 3102535324757546979769201991424213646436436428797539908651019762130873241984353 0954642065753176864287975399086510197621308732419843530954646363924141701919479 6972574750352528130305908083685861463639241417019194796972574750352528130305908 1017544132821910599688377466155243933021710799488577266355044132821910599688377 4661552439330217107995247753069975292197514419736641958864181086403308625530847 7530699752921975144197366419588641810864035 .
The first terms are:
[TABLE]
[TABLE]
As of Jan. 23, 2019, this sequence is not in the OEIS [Sl].
For analogous theorems where one can also have a half-dollar coin, and a half-dollar coin as well as a dollar coin, see the output files
http://sites.math.rutgers.edu/~zeilberg/tokhniot/oEvenChange1b.txt, and
http://sites.math.rutgers.edu/~zeilberg/tokhniot/oEvenChange1c.txt .
How did we get this amazing theorem?
let be the number of ways of having coins in your two pockets (with denominations ) in such a way that the difference between the amount in the left pocket and the amount in the right pocket is cents. Then, we have
[TABLE]
then
[TABLE]
This should be viewed as a formal power series in whose coefficients are Laurent polynomials in , and we are interested in extracting the coefficient of . Now you ask Maple to kindly convert the above rational function into partial fractions, with respect to the variable , getting something of the form
[TABLE]
for some explicit expressions in , , , that Maple finds for you. These are rational functions in but polynomials in .
When we view them all as a formal power series in , and take the coefficient of , the ’s do not contribute anything, so the constant term, in , is simply
[TABLE]
This is implemented in the Maple package EvenChange.txt by procedure GfPAB(P,z,t,A,B) that finds the coefficient of of
[TABLE]
for any polynomial of and any sets of positive integers and (so you can have different kinds of coins in each pocket, and also talk about the number of ways of doing it where the difference between the amounts is not necessarily [math]).
The Maple package EvenChange.txt is available from the front of this article
http://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/change.html .
Since all the generating functions have denominators whose roots are roots of unity, the sequence of interest itself, , is a quasi-polynomial, albeit of a very large period. It is more efficient (still using partial fractions, this time with respect to ) to express it as a sum of quasi-polynomials of small periods. This is done via the procedure GFtoQPS that is lifted from the Maple package
http://sites.math.rutgers.edu/~zeilberg/tokhniot/PARTITIONS ,
that accompanies [SiZ].
This is how we found so quickly and the leading asymptotics of in Theorem 1.
Computing the generating functions dear to Gert Almkvist, Cayley, and Sylvester
In his 1980 paper [A], Gert Almkvist was interested in the sequence of rational functions that he defined as the constant term, in the variable , of the rational function
[TABLE]
Using procedure GfPAB again, we got the following theorem. According to Almkvist [A], The cases are due to Faa de Bruno and , except for are due to Sylvester and Franklin.
Theorem 2:
:
[TABLE]
and its -th coefficient, , is asymptotically
[TABLE]
The first terms (starting with ) are:
[TABLE]
This is A4536 [http://oeis.org/A004526] in [Sl].
:
[TABLE]
and its -th coefficient, , is asymptotically
[TABLE]
The first terms (starting with ) are:
[TABLE]
This is A1971 [http://oeis.org/A001971] in [Sl], that references [A].
:
[TABLE]
and its -th coefficient, , is asymptotically
[TABLE]
The first terms (starting with ) are:
[TABLE]
[TABLE]
This is A1973 [http://oeis.org/A001973] in [Sl].
:
[TABLE]
and its -th coefficient, , is asymptotically
[TABLE]
The first terms (starting with ) are:
[TABLE]
[TABLE]
This is A1975 [http://oeis.org/A001975] in [Sl].
:
[TABLE]
and its -th coefficient, , is asymptotically
[TABLE]
The first terms (starting with ) are:
[TABLE]
[TABLE]
This is A1977 [http://oeis.org/A001977] in [Sl].
:
[TABLE]
where
[TABLE]
[TABLE]
[TABLE]
and
[TABLE]
[TABLE]
and its -th coefficient, , is, asymptotically
[TABLE]
The first terms (starting with ) are:
[TABLE]
[TABLE]
This is A1979 [http://oeis.org/A001979] in [Sl].
For the cases , see the output file
http://sites.math.rutgers.edu/~zeilberg/tokhniot/oEvenChange2b.txt .
The case is A1981 [http://oeis.org/A001981] in [Sl]. As of Jan. 23, 2019, the cases and are not in the OEIS, and probably (we were too lazy to check) neither are the higher ones.
References
[A] Gert Almkvist, Invariants, mostly old ones, Pacific J. Math. 86(1980), 1-13. https://projecteuclid.org/euclid.pjm/1102780612 .
[SiZ] Andrew V. Sills and Doron Zeilberger, Formulae for the Number of Partitions of n into at most m parts(Using the Quasi-Polynomial Ansatz), Advances in Applied Mathematics 48 (2012), 640-645. http://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/pmn.html .
[Sl] Neil A. J. Sloane, The On-Line Encyclopedia of Integer Sequences, https://oeis.org/ .
Shalosh B. Ekhad, c/o D. Zeilberger, Department of Mathematics, Rutgers University (New Brunswick), Hill Center-Busch Campus, 110 Frelinghuysen Rd., Piscataway, NJ 08854-8019, USA. Email: ShaloshBEkhad at gmail dot com .
Doron Zeilberger, Department of Mathematics, Rutgers University (New Brunswick), Hill Center-Busch Campus, 110 Frelinghuysen Rd., Piscataway, NJ 08854-8019, USA. Email: DoronZeil at gmail dot com .
Exclusively published in the Personal Journal of Shalosh B. Ekhad and Doron Zeilberger and arxiv.org .
Written: Jan. 23, 2019.
