The generating function of A348410 in OEIS using the diagonal method and another sequence(A001008) from OEIS
Helmut Prodinger · 2026
Read The generating function of A348410 in OEIS using the diagonal method and another sequence(A001008) from OEIS by Helmut Prodinger (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-21255.txt.
Introduction
Helmut Prodinger finds the generating function of OEIS sequence A348410 using the diagonal method. The sequence terms are coefficients of a product of powers of one minus x and one minus x squared. Applying a 1971 method of Hautus and Klarner with the Gfun software, he derives an algebraic equation for the generating function. A second identity uses the generalized binomial series popularized in Concrete Mathematics.
Catalog record
| CREATOR | Helmut Prodinger |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 6389 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2605.21255
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
The generating function of A348410 in OEIS using the diagonal method and another sequence(A001008) from OEIS
Helmut Prodinger
Abstract
. a n = [ x n ] ( 1 − x ) − n ( 1 − x 2 ) − n a_{n}=[x^{n}](1-x)^{-n}(1-x^{2})^{-n} is the sequence A348410 in the Encyclopedia of Integer Sequences. Using a method from Hautus and Klarner from 1971 and the software Gfun we find an algebraic equation for the generating function g ( z ) = ∑ n a n z n g(z)=\sum_{n}a_{n}z^{n} . The second identity uses the generalized binomial series , popularized in the textbook Concrete mathematics .
.
2020 Mathematics Subject Classification
05A15
1.
Introduction
Let
a_{n}=[x^{n}](1-x)^{-n}(1-x^{2})^{-n},
which is one form of the sequence A348410 in
[
4
]
. The interest of the recent note
[
5
]
was to study the
generating function
g(z)=\sum_{n\geq 0}a_{n}z^{n}.
We offer an approach, originally from Hautus and Klarner
[
2
]
that deserves to be better known.
As a bonus, we discuss another recent identity from the Encyclopedia of Integer Sequences
[
4
]
.
2.
Using the diagonalization method
The first step is to define the bivariate generating function
F(x,y)=\sum_{n\geq 0}y^{n}(1-x)^{-n}(1-x^{2})^{-n}=\frac{(1+x)(1-x)^{2}}{1-x-x^{2}+x^{3}-y}=\sum_{m,n\geq 0}f_{m,n}x^{m}y^{n}.
Then the function of interest
g(z)
is given by the
diagonal
:
g(z)=\sum_{n\geq 0}f_{n,n}z^{n}.
Hautus and Klarner
[
2
]
invented a method to pull out this diagonal using
residues
.
To find the generating function
g(z)
of the diagonal, one should consider
F\Bigl(zt,\frac{1}{t}\Bigr)\frac{1}{t}=\frac{(1+tz)(1-tz)^{2}}{-1+t-z^{2}t^{3}-zt^{2}+z^{3}t^{4}}=\frac{(1+tz)(1-tz)^{2}}{z^{3}(t-s_{1})(t-s_{2})(t-s_{3})(t-s_{4})}.
and further
\frac{1}{2\pi i}\oint\frac{(1+tz)(1-tz)^{2}}{z^{3}(t-s_{1})(t-s_{2})(t-s_{3})(t-s_{4})}dt
where the integral is taken over a simple contour containing all the singularities
s(z)
of
the series such that
s(z)
stays bounded as
z\to 0
.
The function of interest is then the sum of the residues but only those that lie within a small circle around
t=0
.
Now (we use
Gfun
[
3
]
for the following expansions)
\displaystyle s_{1}
\displaystyle=-\frac{1}{z}-\frac{1}{4}+\frac{1}{8}z-\frac{27}{256}z^{2}+\dots,
\displaystyle s_{2}
\displaystyle=\frac{1}{z}+\frac{1}{2}\frac{\sqrt{2}}{\sqrt{z}}-\frac{3}{8}+\frac{37}{128}\sqrt{2z}+\dots,
\displaystyle s_{3}
\displaystyle=\frac{1}{z}-\frac{1}{2}\frac{\sqrt{2}}{\sqrt{z}}-\frac{3}{8}-\frac{37}{128}\sqrt{2z}+\dots,
\displaystyle s_{4}
\displaystyle=1+z+3z^{2}+9z^{3}+32z^{4}+119z^{5}+466z^{6}+1881z^{7}+\dots.
So only
s_{4}
qualifies and we end up with
\displaystyle g(z)
\displaystyle=\text{Res}\Bigl(F\Bigl(zt,\frac{1}{t}\Bigr)\frac{1}{t};t=s_{4}\Bigr)
\displaystyle=\text{Res}\Bigl(\frac{(1+tz)(1-tz)^{2}}{z^{3}(t-s_{1})(t-s_{2})(t-s_{3})(t-s_{4})};t=s_{4}\Bigr)
\displaystyle=[(t-s_{4})^{-1}]\frac{(1+tz)(1-tz)^{2}}{z^{3}(t-s_{1})(t-s_{2})(t-s_{3})(t-s_{4})}
\displaystyle=\frac{(1+tz)(1-tz)^{2}}{z^{3}(t-s_{1})(t-s_{2})(t-s_{3})}\Big|_{t=s_{4}}.
We simplify the denominator by differentiation:
\displaystyle z^{3}(t-s_{1})(t-s_{2})(t-s_{3})\Big|_{t=s_{4}}
\displaystyle=\frac{\partial}{\partial t}z^{3}(t-s_{1})(t-s_{2})(t-s_{3})(t-s_{4})\Big|_{t=s_{4}}
\displaystyle=(1-zt)(1-zt-4z^{2}t^{2})\Big|_{t=s_{4}}.
The final answer is thus
\displaystyle g(z)
\displaystyle=\frac{(1+s_{4}z)(1-s_{4}z)}{1-zs_{4}-4z^{2}s_{4}^{2}}=\frac{1-s_{4}^{2}z^{2}}{1-zs_{4}-4z^{2}s_{4}^{2}}
\displaystyle=1+z+5z^{2}+19z^{3}+85z^{4}+376z^{5}+1715z^{6}+7890z^{7}\dots\,.
Since
s_{4}
satisfies an algebraic equation (of order 4), one may rewrite this as
g(z)=-{\frac{40{z}^{3}s_{4}^{3}+16z^{4}s_{4}^{3}+28{z}^{3}s_{4}^{2}-32z^{2}s_{4}^{2}-40zs_{4}-67{z}^{2}s_{4}+32-35z-64{z}^{2}}{256{z}^{2}+107z-32}}.
This algebraic function satisfies itself an algebraic equation, which we obtain thanks to the procedure
algfuntoalgeq
of
Gfun
. It is
(256z^{2}+107z-32)g^{4}+(-256z^{2}-107z+32)g^{3}+12z(8z+3)g^{2}-4z(4z+1)g+z^{2}=0.
Gfun
can also produce a holonomic recursion for the coefficients
a_{m}
of
g(z)
:
\displaystyle 2680
\displaystyle(4m+1)(2m+1)(4m+3)a_{m}
\displaystyle+(2909610+5084335m+2915850m^{2}+552965m^{3})a_{m+1}
\displaystyle+(-2005464-927852m+180504m^{2}+90732m^{3})a_{m+2}
\displaystyle-64(m+3)(1759m^{2}+8778m+12080)a_{m+3}
\displaystyle+7168(m+4)(m+3)(2m+7)a_{m+4}=0
3.
Sequence A001008
As an epilogue, we offer our approach towards the identity in the title, which appeared recently as
[
6
]
H_{n}=\frac{1}{m}\sum_{k=1}^{n}\frac{(-1)^{k+1}}{k}\binom{mk}{k}\binom{n+(m-1)k}{n-k},
with harmonic numbers
H_{n}
. We start with the RHS and form the generating function
\displaystyle\mathscr{S}
\displaystyle=\sum_{n\geq 1}z^{n}\frac{1}{m}\sum_{k=1}^{n}\frac{(-1)^{k+1}}{k}\binom{mk}{k}\binom{n+(m-1)k}{n-k}
\displaystyle=\frac{1}{m}\sum_{k\geq 1}\sum_{j\geq 0}z^{k+j}\frac{(-1)^{k+1}}{k}\binom{mk}{k}\binom{j+mk}{j}
\displaystyle=\frac{1}{m}\sum_{k\geq 1}z^{k}\frac{(-1)^{k+1}}{k}\binom{mk}{k}\frac{1}{(1-z)^{mk+1}}
\displaystyle=\frac{-1}{m(1-z)}\sum_{k\geq 1}\frac{1}{k}\binom{mk}{k}u^{k},\quad\text{with}\quad u:=\frac{-z}{(1-z)^{m}}.
Note the
u(1-z)^{m}=-z
, or with
\mathscr{B}=1-z
, it leads to
u\mathscr{B}^{m}=\mathscr{B}-1,\quad\text{or}\quad\mathscr{B}=1+u\mathscr{B}^{m}.
This function
\mathscr{B}
is the
generalized binomial series
, as discussed in
[
GKP
]
around page 200.
The substitution
-z=w
is not doing much but makes life a bit easier. Consider
\sum_{k\geq 1}\frac{1}{k}\binom{mk}{k}u^{k},\quad\text{with}\quad u=\frac{w}{(1+w)^{m}}.
We claim that
\frac{1}{m}\sum_{k\geq 1}\frac{1}{k}\binom{mk}{k}u^{k}=\log(1+w).
In order to get rid of the logarithm we study a differentiated form
\frac{1}{m}\sum_{k\geq 1}\frac{1}{k}\binom{mk}{k}ku^{k-1}=\frac{(1+w)^{m+1}}{1+w-wm}\frac{1}{1+w}.
Multiplying it by
u
leads to an equivalent form
\frac{1}{m}\sum_{k\geq 1}\binom{mk}{k}u^{k}=\frac{w}{1+w-wm}.
Addying the term for
k=0
and then multiplying by
m
,
\sum_{k\geq 0}\binom{mk}{k}u^{k}=\frac{1+w}{1+w-wm}.
The key to the success is the formula (5.61) in
[
1
]
, which evaluates the sum:
\sum_{k\geq 0}\binom{mk}{k}u^{k}=\frac{1}{1-m+m\mathscr{B}^{-1}}=\frac{1}{1-m+\frac{m}{1+w}}=\frac{1+w}{1+w-m-mw+m}=\frac{1+w}{1+w-wm},
as desired.
Then
\mathscr{S}=-\frac{1}{1-z}\log(1+w)=-\frac{1}{1-z}\log(1-z)=\sum_{n\geq 1}H_{n}z^{n},