---
title: Stern Polynomials
url: https://www.emergentmind.com/topics/stern-polynomials
type: topic
---

# Stern Polynomials

Stern polynomials are polynomial analogues of Stern’s diatomic sequence, obtained by lifting the dyadic recurrences \(s_{2n}=s_n\) and \(s_{2n+1}=s_n+s_{n+1}\) to polynomial-valued families. In the literature, the term refers to several closely related constructions—notably the univariate sequence \(B_n(t)\) or \(S_n(\lambda)\), the Dilcher–Stolarsky polynomials \(a(n;z)\), and multivariate or base-\(b\) refinements—all of which retain a strong dependence on binary or \(b\)-ary digital structure and support connections to hyperbinary expansions, continued fractions, complex zeros, reciprocity, automaticity, and algebraic independence [1102.5109] [1202.4110] [1810.11096] [2511.03847].

## 1. Foundational definitions and principal variants

The classical Stern diatomic sequence is defined by
\[
s_0=0,\qquad s_1=1,\qquad s_{2n}=s_n,\qquad s_{2n+1}=s_n+s_{n+1}.
\]
Its polynomial analogues preserve this dyadic structure while introducing one or more variables. The most standard univariate family in the arithmetic literature is
\[
B_0(t)=0,\qquad B_1(t)=1,\qquad B_{2n}(t)=tB_n(t),\qquad B_{2n+1}(t)=B_n(t)+B_{n+1}(t),
\]
and the same recurrence also appears in the notation \(S_n(\lambda)\) [1102.5109] [1401.3553] [2511.03847].

A second important univariate family, introduced by Dilcher and Stolarsky, is
\[
a(0;z)=0,\qquad a(1;z)=1,\qquad a(2n;z)=a(n;z^2),\qquad a(2n+1;z)=z\,a(n;z^2)+a(n+1;z^2),
\]
with \(a(n;1)=a(n)\). This family is characterized by the fact that every coefficient is \(0\) or \(1\) [1202.4110] [2603.25174].

The literature also contains a bivariate refinement
\[
s_1(x,y)=1,\qquad s_{2n}(x,y)=s_n(x,y),\qquad s_{2n+1}(x,y)=x\,s_n(x,y)+y\,s_{n+1}(x,y),
\]
and an arbitrary-base generalization \(T_b(n\mid z_1,\dots,z_b)\) whose recurrences encode hyper \(b\)-ary expansions [1610.00108] [1810.11096].

| Family | Recurrence | Specialization |
|---|---|---|
| \(B_n(t)\), \(S_n(\lambda)\) | \(B_{2n}=tB_n\), \(B_{2n+1}=B_n+B_{n+1}\) | \(B_n(1)=s(n)\), \(B_n(2)=n\) |
| \(a(n;z)\) | \(a(2n;z)=a(n;z^2)\), \(a(2n+1;z)=z\,a(n;z^2)+a(n+1;z^2)\) | \(a(n;1)=a(n)\) |
| \(s_n(x,y)\) | \(s_{2n}=s_n\), \(s_{2n+1}=x\,s_n+y\,s_{n+1}\) | \(s_n(1,1)=s_n\) |
| \(T_b(n\mid z_1,\dots,z_b)\) | \(b\)-ary recursion in the variables \(z_1,\dots,z_b\) | \(T_b(n+1\mid 1,\dots,1)=s_b(n)\) |

For the univariate family \(S_n(\lambda)\), evaluating at \(\lambda=1\) recovers the classical Stern sequence, and the literature also notes simple special values such as \(S_n(2)=n\) [2511.03847]. For \(B_n(t)\), explicit formulas at indices near powers of two include
\[
B_{2^n-1}(t)=\frac{t^n-1}{t-1},\qquad B_{2^n}(t)=t^n,\qquad B_{2^n+1}(t)=\frac{t^n-1}{t-1}+t
\]
[1102.5109].

## 2. Combinatorial interpretations

A central feature of Stern polynomials is that their coefficients encode refined counting data for hyperbinary expansions. For the univariate family \(B_n(t)\), if
\[
B_n(t)=\sum_{i=0}^{e(n)} a(i,n-1)t^i,\qquad e(n)=\deg B_n(t),
\]
then the coefficient \(a(i,n-1)\) counts the number of hyperbinary representations of \(n-1\) using exactly \(i\) digits equal to \(1\) [1909.10844]. This makes \(B_n(t)\) a generating polynomial for the distribution of hyperbinary representations by the number of \(1\)-digits.

This coefficient interpretation admits a signed-digit reformulation. If \(b_0(n,i,\ell)\) denotes the number of \(i\)-bit binary signed-digit representations of \(n\) having exactly \(\ell\) zeros, then
\[
B_{2^i-n}=\sum_{\ell\ge 0} b_0(n,i,\ell)\,t^\ell.
\]
Consequently, the leading coefficient of \(B_{2^i-n}\) is the number of optimal BSD representations of \(n\), and \(\deg(B_{2^i-n})\) is the number of zeros in the reduced NAF of \(n\) [2108.12417].

The bivariate refinement \(s_n(x,y)\) records different statistics on hyperbinary expansions. The coefficient
\[
[x^i y^j]\,s_n(x,y)
\]
is the number of hyperbinary expansions of \(n-1\) having exactly \(i\) digits equal to \(2\) and \(j\) digits equal to \(0\). Thus
\[
s_n(x,y)=\sum_{i,j\ge 0} h_n(i,j)x^iy^j
\]
packages the joint distribution of hyperbinary expansions by numbers of \(2\)’s and \(0\)’s [1610.00108].

The ordinary Stern sequence itself can also be represented polynomially through generalized Chebyshev polynomials. If an odd integer \(n\) has binary gap encoding \(n=[c_1,\dots,c_m]\), then
\[
a([c_1,\dots,c_m])=q_m(c_1+1,\dots,c_m+1),
\]
where \(q_m\) is defined recursively by
\[
q_0=1,\qquad q_1(y_1)=y_1,\qquad q_r(y_1,\dots,y_r)=y_1q_{r-1}(y_2,\dots,y_r)-q_{r-2}(y_3,\dots,y_r).
\]
An equivalent determinant formula is
\[
a([c_1,\dots,c_r])=\det\!\bigl(I_r+M_r(c_1,\dots,c_r)\bigr),
\]
with \(M_r\) tridiagonal [1511.02422]. This places Stern-type recurrences in the same framework as generalized Chebyshev polynomials and tridiagonal determinants.

## 3. Structural identities, degree theory, and arithmetic phenomena

The arithmetic theory of the univariate family \(B_n(t)\) is dominated by exact dyadic identities. Among the basic formulas are
\[
t^a B_{2^a n-1}(t)=\frac{t^a-1}{t-1}B_n(t)+B_{n-1}(t),\qquad
t^a B_{2^a n+1}(t)=\frac{t^a-1}{t-1}B_n(t)+B_{n+1}(t),
\]
together with the symmetry theorem
\[
B_{2^n+1}(t)-B_{2^n-i}(t)=
\begin{cases}
t(t-1)\,B_{2^{n-1}-i}(t), & 0\le i\le 2^{n-1}-1,\\[4pt]
-t(t-1)\,B_{i-2^{n-1}-1}(t), & 2^{n-1}\le i\le 2^n.
\end{cases}
\]
A further determinantal identity,
\[
B_{k+1}(t)B_{2^n-k}(t)-B_k(t)B_{2^n-k-1}(t)=t^n \qquad (0\le k\le 2^n-2),
\]
implies in particular that \(\gcd(B_n(t),B_{n+1}(t))=1\) for every \(n\) [1102.5109].

The degree sequence
\[
e(n)=\deg B_n(t)
\]
satisfies
\[
e(1)=0,\qquad e(2n)=e(n)+1,\qquad e(4n+1)=e(n)+1,\qquad e(4n+3)=e(n+1)+1.
\]
Its distribution is unusually rigid: the generating function
\[
E(x)=\sum_{n=1}^\infty x^{e(n)}=\frac1{1-3x}
\]
implies that the number of indices \(n\) such that \(e(n)=k\) is exactly \(3^k\). On dyadic intervals \([2^{n-1},2^n]\), one has
\[
\min e(i)=\left\lfloor\frac n2\right\rfloor,\qquad \max e(i)=n,
\]
and runs of equal degrees can have length \(3\) but never \(4\) [1102.5109].

A second invariant is the order at the origin,
\[
d(n)=\operatorname{ord}_{t=0}B_n(t).
\]
It satisfies
\[
d(2n)=d(n)+1,\qquad d(2n+1)=0,
\]
hence
\[
d(n)=\nu(n),
\]
where \(\nu(n)\) is the largest power of \(2\) dividing \(n\). The map \(n\mapsto (d(n),e(n))\) is onto \(\{(a,b)\in\mathbb N\times\mathbb N: a\le b\}\) [1102.5111].

The rational-root problem has a complete answer: if \(a\in\mathbb Q\) and \(B_n(a)=0\) for some positive integer \(n\), then
\[
a\in \left\{0,-1,-\frac12,-\frac13\right\}.
\]
Each of these four values occurs as a root of infinitely many Stern polynomials. The same work gives complete characterizations of the indices satisfying \(e(n)=e(n+1)\) and \(e(n)=e(n+1)=e(n+2)\), and constructs infinite families of reciprocal Stern polynomials, with
\[
\#(\mathrm{Rec}\cap[1,n])=\Omega\bigl((\log n)^{3/2}\bigr)
\]
for
\[
\mathrm{Rec}=\{n\mid B_n(t)=t^{e(n)}B_n(1/t)\}
\]
[1401.3553].

Further arithmetic rigidity appears in congruence problems. For fixed \(m\ge 2\) and \(r\in\{0,\dots,m-1\}\), the congruence
\[
B_n(t)\equiv 1+r t\frac{t^{e(n)}-1}{t-1}\pmod m
\]
forces all positive-degree coefficients to be congruent modulo \(m\). Infinite non-trivial families are proved for \(m=2\) with \(r=0,1\) and for \(m=3\) with \(r=0\) [1909.10844].

## 4. Zeros in the complex plane and irreducibility

The complex zero set of Stern polynomials has been studied for more than one univariate model. For the Klavžar-type family \(S_n(\lambda)\), Dilcher, Kidwai, and Tomkins conjectured that if \(\mathcal Z\) denotes the set of all zeros, then
\[
\mathcal Z \subseteq \{w\in\mathbb C:\operatorname{Re}(w)<1\}.
\]
Partial progress toward this half-plane conjecture establishes the zero-free region
\[
S_n(w)\neq 0\qquad\text{for every }n\ge 1\text{ and every }w\in\mathbb C\text{ with }|w-2|\le 1.
\]
Equivalently, no Stern polynomial has a root in the closed disk centered at \(2\) with radius \(1\) [2511.03847].

The proof proceeds through continued fractions. Schinzel’s formula expresses certain ratios of Stern polynomials as continued fractions with coefficients built from the geometric-series polynomials
\[
(a)_n=1+a+\cdots+a^{n-1}.
\]
The critical step is to show that, for \(w\) in the disk \(|w-2|\le 1\), the continued-fraction elements
\[
w_{a,b}=\frac{w^a}{(w)_a(w)_b}
\]
lie in a parabolic region \(E=E_{\pi/12}\), so that the Parabola Theorem for convergence of generalized continued fractions applies. The denominator \(S_n(w)\) therefore cannot vanish [2511.03847].

This zero-free disk has an arithmetic consequence. If \(p\) is a positive prime, then
\[
S_p(\lambda)\text{ is irreducible in }\mathbb Z[\lambda].
\]
The argument uses \(S_p(2)=p\) together with the zero-free theorem to exclude nonconstant factors evaluating to \(1\) at \(2\) [2511.03847].

For the Dilcher–Stolarsky family \(a(n;z)\), the asymptotic zero distribution is different in form but comparably rigid. If \(\sharp_n^\angle(\theta_1,\theta_2)\) counts zeros in an angular sector and \(\sharp_n^\circ(\rho)\) counts zeros in the annulus
\[
1-\rho \le |z| \le \frac{1}{1-\rho},
\]
then explicit Erdős–Turán and Hughes–Nikeghbali bounds show angular equidistribution and radial concentration near \(|z|=1\). In particular, almost all zeros lie close to the unit circle, and their arguments become asymptotically equidistributed [1202.4110].

The same analysis isolates a real zero phenomenon. The only Stern polynomials of odd degree in this model are \(a(4n+3;z)\), and each such polynomial has a unique real zero in \((-1,0)\) [1202.4110].

## 5. Generating functions, matrices, and analytic limits

The recursive definition of Stern polynomials admits compact generating-function formulations. For the standard univariate family,
\[
B(t,x)=\sum_{n=0}^\infty B_n(t)x^n
\]
has the product expansion
\[
B(t,x)=x\prod_{n=0}^\infty \bigl(1+tx^{2^n}+x^{2^{n+1}}\bigr).
\]
From this one obtains summation identities such as
\[
\sum_{i=1}^{2^k} B_i(t)=\frac{(t+2)^k+t^k}{2}
\]
and
\[
\sum_{i=1}^{2^k} (-1)^i B_i(t)
= \frac{t-2}{2}\bigl((t+2)^{k-1}+t^{k-1}\bigr)+t^{k-1}
\]
[1102.5109].

The arbitrary-base generalization \(T_b(n\mid z_1,\dots,z_b)\) satisfies the product formula
\[
\sum_{n\ge 1} T_b(n\mid z_1,\dots,z_b)\, t^n
=
t\prod_{i\ge 0}\left(1+\sum_{j=1}^b z_j\, t^{j b^i}\right),
\]
which encodes hyper \(b\)-ary expansions by multiplicity. The same theory also yields a matrix realization: if \(n=(i_s\cdots i_1 i_0)_b\), then
\[
T_b(n\mid z_1,\dots,z_b)
=
\begin{bmatrix} 1 & 0 \end{bmatrix}
A_{i_0}(0)A_{i_1}(1)\cdots A_{i_s}(s)
\begin{bmatrix}1\\0\end{bmatrix}
\]
for explicit digit-dependent \(2\times 2\) matrices \(A_i(d)\) [1810.11096].

A different matrix construction is built directly from the coefficients of the Dilcher–Stolarsky polynomials \(s(n;x)\). The resulting infinite lower-triangular matrix \(R\) has inverse \(R^{-1}\) with entries only in \(\{0,1,-1\}\), and
\[
\bigl|(R^{-1})_{n,k}\bigr| = \binom{2n-k-1}{n-k}\pmod 2.
\]
The sign pattern is determined by the Prouhet–Thue–Morse sequence:
\[
\operatorname{sign}\bigl((R^{-1})_{n,k}\bigr)=(-1)^{t_{n-k}}.
\]
This matrix formalism also leads to identities involving Stern, Fibonacci, Padovan, Catalan, Fine, and Gould sequences [2106.10400].

The analytic theory of subsequences is equally distinctive. For any binary sequence \(\{b_k\}\), the Dilcher–Stolarsky polynomials
\[
a\!\left(2^{m+1}n+\sum_{j=0}^{m}2^j b_j;\,z\right)
\]
converge, for every fixed \(n>0\), to the same analytic function \(f_{\{b_k\}}(z)\) on the open unit disk. There are uncountably many such limit functions, each represented by a power series with coefficients in \(\{0,1\}\) [1202.4110].

In a more recent Mahler-theoretic development, Dilcher–Eriksen subsequences of Type 1 Stern polynomials give rise to limit functions \(H_k(z)\) satisfying a two-term functional equation and an infinite continued fraction. For any algebraic number \(\alpha\) with \(0<|\alpha|<1\), the values
\[
H_k(\alpha)\qquad\text{and}\qquad H_k(\alpha^{t^k})
\]
are algebraically independent. As a consequence,
\[
\frac{H_k(\alpha)}{H_k(\alpha^{t^k})}
\]
is transcendental for every such \(\alpha\) [2603.25174].

## 6. Symmetry, generalization, and related applications

Digit symmetry is one of the most striking refinements of the Stern framework. If \(n^R\) is obtained by reversing the binary expansion of \(n\), then the bivariate Stern polynomials satisfy
\[
s_n(x,y)=s_{n^R}(x,y).
\]
This extends Dijkstra’s digit-reversal property for the Stern sequence \(s_n=s_{n^R}\) and implies the coefficientwise symmetry
\[
h_n(i,j)=h_{n^R}(i,j)
\]
for the hyperbinary statistics encoded by \(s_n(x,y)\) [1610.00108].

The arbitrary-base theory replaces hyperbinary expansions by hyper \(b\)-ary expansions and the binary Stern recursion by \(b\)-ary recurrences. Its extremal indices are
\[
a_k=\frac{b^k-1}{b-1}+\frac{1-(-1)^k}{2},
\]
which satisfy
\[
a_n = b\,a_{n-1} + 1 - \frac{1+(-1)^n}{2}.
\]
At these indices the polynomials obey Fibonacci-type recurrences and admit continued-fraction representations that specialize, when \(z_1=\cdots=z_b=1\), to continued fractions converging to the golden ratio \(\varphi\) [1810.11096].

The connection with signed-digit arithmetic provides a computational application. On the NAF-interval
\[
I_k = [a_k, a_{k+1}) = \left[ \frac{2^k}{3}, \frac{2^{k+1}}{3} \right),
\]
the degree and leading coefficient recursions for \(B_n(t)\) translate into recursions for the number \(Z(n)\) of zeros in an optimal BSD representation and the number \(M(n)\) of optimal BSD representations. This leads to two \(\mathcal O(n)\) algorithms, one computing \(Z[n]\) for every \(n\in I_k\) and one computing \(M[n]\) for every \(n\in I_k\) [2108.12417].

A broader implication of these developments is that Stern polynomials occupy a common research interface between digital combinatorics, recursive algebra, continued fractions, analytic function theory, and arithmetic geometry. The univariate, multivariate, and \(b\)-ary variants differ in detail, but they consistently exhibit the same underlying phenomenon: dyadic or \(b\)-adic recursion is strong enough to control coefficients, degrees, special values, zeros, and, in several cases, transcendence and irreducibility [1511.02422] [2108.12417] [2511.03847].

Source: https://www.emergentmind.com/topics/stern-polynomials