ABSTRACT (original article): We develop a general finite-alphabet framework for Euler-type sums based on the notion of a monoidal alphabet. An alphabet of summand letters is called monoidal when it is closed under pointwise multiplication, thereby inducing the usual stuffle, or quasi-shuffle, algebra on the associated nested sums. This viewpoint places classical multiple harmonic numbers, colored harmonic sums, and several generalized Euler sums under a common structural mechanism. We focus on three fundamental families of monoidal alphabets: the ordinary power alphabet generated by
n
, the affine alphabet generated by linear factors
an+b
, and the polynomial-base alphabet generated by polynomial factors
P(n)
. The resulting classes of multiple harmonic numbers, multiple affine harmonic numbers, and multiple polynomial-base harmonic numbers provide systematic containers for a wide range of finite and infinite Euler-type sums. We prove closure and lifting results showing that nested sums whose summands are built from these alphabets, possibly multiplied by harmonic-number factors, reduce to the corresponding finite harmonic-number objects. As consequences, the framework recovers many known Euler-sum identities and produces many new identities in a uniform way. While reduction to simpler functions remains a separate and often difficult problem, the monoidal-alphabet perspective provides a unified algebraic language for organizing, transforming, and extending harmonic-sum identities. CITATION (original article): Jayanta Phadikar (2026), Monoidal Alphabets for Generalized Harmonic Sums, arXiv:2605.21525. https://doi.org/10.48550/arXiv.2605.21525
Why do so many sums containing harmonic numbers, shifted denominators, recurrence sequences, and polynomial factors admit closely related transformations? The useful common object is not a particular special function. It is a collection of one-variable summands that is closed under multiplication. Such a collection is a monoidal alphabet. Its letters form words, and the words represent nested sums.
This article develops the mechanism behind three classes: colored harmonic sums, affine-base sums, and polynomial-base sums. The emphasis is on the construction, what each class contains, and calculations in Wolfram Language. Formal proofs and the full theorem statements remain in the accompanying paper, Monoidal Alphabets for Generalized Harmonic Sums. Expand the reference groups for the complete worked-example collection and the detailed tables; they are not required for a first reading.

Contents

1. From Euler sums to a common structure
2. Letters, words, and the three alphabets
2.1 The one definition we need
2.2 Colored harmonic letters
2.3 Why affine and polynomial letters are needed
3. The finite summation engine
3.1 Prepend a letter or merge it
3.2 Aligned affine upper limits
3.3 Adjacent shifts and progression weights
4. Affine-base sums
5. Polynomial-base sums
6. Scaled upper indices
7. Nested sums
8. Infinite sums: take limits after reduction
8.1 Convergence and safe cancellation
9. Normal forms are not the same as evaluations
10. What to take away

Before running the examples

Keep AffinePolyBaseSupport.wl in the same directory as this notebook. The companion package provides MultipleAffineHarmonicNumber and MultiplePolyBaseHarmonicNumber and installs specialized Sum rules for the affine and polynomial examples. These two names are package functions, not built-in Wolfram Language functions.
Load the companion definitions
Get[FileNameJoin[{NotebookDirectory[],"AffinePolyBaseSupport.wl"}]];
Throughout, nested harmonic words use strict inequalities. Weak (star) sums are converted by collecting equal indices. Finite upper limits are nonnegative integers unless an analytic continuation is explicitly stated. Bases in denominators must not vanish on the summation range, and complex powers require a fixed, consistent branch.

Notation from the paper (expand to read)


1. From Euler sums to a common structure

A classical Euler sum inserts a harmonic number into another series, for example
∑
n≥1
H
n

2
n
=2ζ(3)
. Products of harmonic numbers produce nonlinear Euler sums; colors, shifts, and general denominator factors lead to broader families. Their algebra is already visible before taking an infinite limit.
The central distinction is between two tasks. First, express a sum in a class that is closed under the required operations. Second, reduce that expression to simpler functions or constants when additional identities are available. A uniform answer to the first task is valuable even when the second has no known solution.
H
N
=
N
∑
n=1
1
n
,
N
∑
n=1
H
n
n
=
1
2

2
H
N
+
(2)
H
N
.
A finite identity that exposes the diagonal term
In[]:=
TableTotalTable
HarmonicNumber[j]
j
,{j,1,m}
1
2
(
2
HarmonicNumber[m]
+HarmonicNumber[m,2]),{m,1,8}
Out[]=
{True,True,True,True,True,True,True,True}
The square separates into two strict triangular regions and their diagonal. That simple partition is the source of the quasi-shuffle rule used throughout the article. The same partition works for much more general one-variable factors.

2. Letters, words, and the three alphabets

2.1 The one definition we need

A letter
a
is a function of a positive integer. An alphabet is monoidal when it contains the constant letter 1 and is closed under the pointwise product
(a∘b)(n)=a(n)b(n)
. A word is an ordered list of letters. Its finite sum is
W
a
1
,…,
a
d
(N)=
∑
N≥
n
1
>⋯>
n
d
≥1
d
∏
j=1
a
j
(
n
j
),
W
∅
(N)=1.
The product of two word sums is found by ordering their indices. Distinct indices give interleavings; equal indices multiply the corresponding letters. Closure of the alphabet under that multiplication is exactly what keeps the answer in the same class. At depth one:
W
a
(N)
W
b
(N)=
W
a,b
(N)+
W
b,a
(N)+
W
a∘b
(N).
Here is a deliberately small evaluator that makes the definition executable. It works with any pure-function letters and finite upper limit; it is a teaching and checking tool, not a replacement for a symbolic summation engine. The letter constructors capture their parameters, so they can be used safely inside nested calculations.
A finite strict-word evaluator
In[]:=
ClearAll[wordSum];​​wordSum[letters_List,upper_Integer?NonNegative]:=Module[{walk},walk[{},m_Integer]:=1;walk[w_List,m_Integer]/;w=!={}:=Total[Table[First[w][j]walk[Rest[w],j-1],{j,1,m}]];walk[letters,upper]];
Colored letters and pointwise merging
In[]:=
ClearAll[coloredLetter,mergeLetter];​​coloredLetter[r_,s_:1]:=With{rr=r,ss=s},Functiont,
t
ss
rr
t
;​​mergeLetter[f_,g_]:=With[{ff=f,gg=g},Function[t,ff[t]gg[t]]];
Check the three regions exactly
In[]:=
Modulea=coloredLetter1,
1
2
,b=coloredLetter[2,-1],Table[wordSum[{a},m]wordSum[{b},m]wordSum[{a,b},m]+wordSum[{b,a},m]+wordSum[{mergeLetter[a,b]},m],{m,1,8}]
Out[]=
{True,True,True,True,True,True,True,True}

2.2 Colored harmonic letters

a
r,s
(n)=
n
s
r
n
,(r,s)∘(u,t)=(r+u,st).
The color
s
supplies the geometric factor and the weight
r
supplies the power of
n
. Ordinary harmonic numbers have color 1; alternating and residue-class behavior are encoded by other colors, especially roots of unity. Products, strict multiple sums, and star sums therefore share one alphabet. In the paper this word sum is denoted
ℋ
.
This class also contains many less obvious ingredients after rewriting: polygamma values and Hurwitz/Lerch tails differ from harmonic sums by constants; fixed-order hyperharmonic numbers are finite combinations of weighted harmonic sums; constant-coefficient recurrence sequences are exponential-polynomial combinations. Fixed-modulus periodic factors, floors of rational linear expressions, and selected arithmetic functions at prime powers can be treated through polynomials and finite Fourier expansions. The precise qualifications and examples are in the expandable inventory.
An ordinary depth-one word is a harmonic number
In[]:=
Table[wordSum[{coloredLetter[2]},m]HarmonicNumber[m,2],{m,0,8}]
Out[]=
{True,True,True,True,True,True,True,True,True}

Worked examples: the colored dictionary (14 examples) (expand to read)


Complete colored-family inventory (expand to read)


2.3 Why affine and polynomial letters are needed

A denominator such as
(2n+1
r
)
suggests an affine letter; a factor such as

2
n
+1
r
)
suggests a polynomial-base letter. A collision can produce several different bases at the same index, so one letter must be allowed to contain a product of factors, not just one. The three basic shapes are
n
s
r
n
,
n
σ
∏
ν
-
ρ
ν
(
a
ν
n+
b
ν
)
,
n
σ
∏
ν
P
ν
-
ρ
ν
(n)
.
For affine and polynomial letters, merging multiplies the colors and concatenates the lists of factors. Identical bases can then be combined with their exponents added. The word-sum construction and the quasi-shuffle rule are unchanged. Sections 4 and 5 give the corresponding code and examples.

3. The finite summation engine

3.1 Prepend a letter or merge it

Suppose the inner word is
(b,β)
and the outer factor is a letter
a(n)
. In the product
a(n)
W
b,β
(n)
, the largest inner index is either strictly below
n
or equal to
n
. Summing over
n
gives the entire finite reduction rule:
N
∑
n=1
a(n)
W
b,β
(n)=
W
a,b,β
(N)+
W
a∘b,β
(N).
For the empty inner word, the answer is simply the one-letter word. For a product of inner word sums, apply quasi-shuffle first and then use this rule on each word. This proves closure for finite linear combinations and nonnegative integer powers of inner factors. It does not automatically cover arbitrary fractional powers of an entire harmonic sum.
The rule for a weighted harmonic sum
In[]:=
Modulea=coloredLetter2,
1
2
,b=coloredLetter[1],Table[Total[Table[a[j]wordSum[{b},j],{j,1,m}]]wordSum[{a,b},m]+wordSum[{mergeLetter[a,b]},m],{m,1,8}]
Out[]=
{True,True,True,True,True,True,True,True}

Finite colored sums: the full example table (expand to read)


Wolfram Language V15 Examples

Example 1
Two harmonic factors and a complex outer weight.
In[]:=
k
∑
n=1
HarmonicNumber[n,2]HarmonicNumber[n,3]
4+2
n
Example 2
A geometric factor with ordinary and alternating harmonic numbers.
In[]:=
k
∑
n=1
n
1
2
HarmonicNumber[n,]AlternatingHarmonicNumbern,2,+
1
3

Example 3
A divisor sum at prime powers multiplied by a depth-two harmonic number.

3.2 Aligned affine upper limits

Even indices are selected by a two-color filter

Wolfram Language V15 Examples

Example 1
A depth-two harmonic number on the progression 2 n + 3.
Example 2
Ordinary and alternating factors with the same upper limit 2 n + 5.
Example 3
A hyperharmonic factor and a complex power on the same progression.

3.3 Adjacent shifts and progression weights

The alignment matters: the paper distinguishes shifts for which complex outer powers are allowed from reductions within the basic colored alphabet that require integer powers. The conditions in the retained table should therefore be read as part of each example, not as decorative annotations. More general shifted denominators belong naturally to the affine class.

Wolfram Language V15 Examples

Example 1
A harmonic upper limit shifted by one relative to the denominator.
Example 2
A color and two harmonic factors evaluated at n + 1.
Example 3
A scaled, shifted hyperharmonic upper limit.

4. Affine-base sums

Only the letter representation changes. When two affine letters merge, keep both factor lists at the common index; this is essential when their slopes and shifts differ. Positive weights denote denominator powers. A numerator factor is represented by a negative weight.
An affine letter for the small evaluator
Two different affine bases in one letter
The package uses MultipleAffineHarmonicNumber[N, weights, colors, forms]. Each word level has its own weight list and affine-form list; {a,b} denotes a n + b. Thus the next expression is a depth-one word with two factors at its sole level, not a depth-two word.
Check the package data model against the direct sum

Wolfram Language V15 Examples

Example 1
A colored harmonic factor over a complex power of 2 n + 10.
Example 2
A parity restriction and a genuinely complex affine shift.
Example 3
Three distinct affine factors and a colored depth-two word.

5. Polynomial-base sums

Polynomial coefficients are stored in ascending order
A quadratic base without factorization
MultiplePolyBaseHarmonicNumber uses the same per-level nesting of weights, colors, and factor lists as the affine function. Here {c0,c1,c2,...} denotes c0 + c1 n + c2 n^2 + ... . For example, {{1,0,1}} is one quadratic base at a level. The word depth is the number of levels, not the polynomial degree or the number of factors.
Check the polynomial package representation

Wolfram Language V15 Examples

Example 1
Three polynomial bases with complex powers and a colored harmonic word.
Example 2
A polynomial-base word multiplied by new quadratic factors.
Example 3
A numerator with noninteger power and a quartic denominator base.

6. Scaled upper indices

The factor in this depth-one formula comes from rescaling the denominator and averaging the filter. At greater depth, a filter is needed for each index. Affine and polynomial bases transform by substituting the rescaled variable in every factor. The same principle is useful inside nested sums, provided the discrete bounds and boundary terms are tracked consistently.
A depth-one lifting check with M = 2 and r = 2

Wolfram Language V15 Examples

Example 1
A harmonic number at 3 n with an outer fourth power.
Example 2
A geometrically weighted hyperharmonic number at 2 n.
Example 3
A depth-two word at 2 n with complex weights.

7. Nested sums

Evaluate a finite nested sum from the inside outward. At each stage, reduce products to words and apply the prepend-or-merge rule. Weak inequalities introduce equality cases, which are precisely the merged-letter terms. The class remains colored, affine, or polynomial according to the letters that occur; mixed affine/polynomial problems can use the polynomial class.
A weak triangle becomes a strict word plus its diagonal
This is a statement about suitable ordered one-variable letter products. A genuinely coupled kernel, for example one depending irreducibly on i + j, does not become a word merely because it appears in a double sum. Such a kernel needs a further decomposition or a larger framework.

Wolfram Language V15 Examples

Example 1
A double sum with a scaled inner harmonic argument.
Example 2
A triple sum with powers and a hyperharmonic factor.
Example 3
Harmonic and alternating factors on different levels of a weak triangle.

Wolfram Language V15 Examples

Example 1
Two affine summation levels with an affine harmonic factor.
Example 2
A polynomial-base word inside a double quadratic sum.
Example 3
A mixed affine/polynomial example represented in the polynomial class.

8. Infinite sums: take limits after reduction

The finite identities require no convergence argument. To pass to infinity, convergence must be established separately. A convergent colored word gives a multiple polylogarithmic value (and a multiple zeta value when every color is 1). Here these terms follow the paper's extended convention allowing complex weights; the classical notation uses positive integer weights. Affine and polynomial words have corresponding limiting value spaces; these names describe the limits, not a promise that they reduce to ordinary zeta values.
For example, the finite prepend-or-merge rule gives the familiar decomposition of an Euler sum into a depth-two value and a diagonal zeta value. At weights 2 and 1, this is Euler's identity shown at the start. The following numerical check compares finite partial sums with the limiting constant; it is an illustration, not a convergence proof.
Approach the Euler-sum constant numerically

8.1 Convergence and safe cancellation

A simple sufficient absolute-convergence test is available when every color has modulus at most 1, affine factors have nonzero slopes, and bases do not vanish on the range. Assign each level its effective power: its weight in the colored class, the sum of its affine weights in the affine class, and the sum of degree times weight in the polynomial class. If the real part of every prefix sum of effective powers exceeds the prefix length, the nested series converges absolutely. This deliberately conservative test is not necessary; decaying colors and oscillation allow many additional cases. The sharper prefix-product conditions are given in Appendix B of the paper.
A conservative test for real effective powers
The two terms in the numerator would each produce a divergent series on their own. The difference is summable. The retained worked examples show both the depth-one subtraction and its depth-two analogue.

Wolfram Language V15 Examples

Example 1
A nonlinear ordinary Euler sum with four harmonic factors.
Example 2
A convergent alternating Euler sum.
Example 3
An infinite weakly nested sum with decaying colors.

9. Normal forms are not the same as evaluations

Quasi-shuffle reduction can produce many terms. Ordering letters and using the Chen–Fox–Lyndon factorization gives an organized algebraic normal form in Lyndon-word generators. Nonpositive integer weights can often be simplified further through polynomial summation and endpoint terms. These are algebraic reductions within the chosen class.
An algebraic normal form is not necessarily the shortest formula and does not prove that the resulting constants are algebraically independent. Special-function identities, symmetries, shuffle relations from integral representations, and numerical recognition can supply additional information. They should be separated from the finite closure theorem.
Solve a simple product relation for its depth-two word

10. What to take away

The essential workflow is short: choose letters closed under pointwise multiplication; rewrite products and weak index orderings as strict words; synchronize upper limits when needed; then sum by prepending or merging the outer letter. Only after the finite reduction should convergence, limiting constants, and further simplification be considered.
Colored, affine, and polynomial-base sums are three implementations of this same idea. The value of the framework is that it explains why many superficially different harmonic-sum problems behave alike, and it identifies exactly what has to change when a new kind of factor is introduced. The Wolfram Language examples turn that structural viewpoint into concrete calculations.
For proofs, full hypotheses, historical context, and the sharper convergence criteria, see the accompanying paper. The expandable references below retain the bibliography used there. Equation and theorem numbers inside the retained worked-example groups refer to that paper. The supplementary materials are not included in this Community notebook.

CITE THIS NOTEBOOK

Monoidal alphabets for generalized harmonic sums​
by Jayanta Phadikar​
Wolfram Community, STAFF PICKS, October 7, 2026
​https://community.wolfram.com/t/28280