---
title: 'Good Integers: Theory and Applications'
url: https://www.emergentmind.com/topics/good-integers
type: topic
---

# Good Integers: Theory and Applications

Searching arXiv for recent and foundational papers on “good integers” to ground the article in the literature.
Good integers are positive integers characterized by a divisibility condition in exponential sums. Fix nonzero coprime integers \(a\) and \(b\). A positive integer \(\ell\) is good with respect to \((a,b)\) if there exists \(k\ge 1\) such that \(\ell\mid a^{k}+b^{k}\). Since Moree’s 1997 introduction of the notion, the subject has developed into a number-theoretic theory organized by multiplicative orders, \(2\)-adic valuations, and prime-power factorization, and it now plays a substantial role in algebraic coding theory [2508.19629]. A later extension introduces \((T,k)\)-good integers, defined by divisibility in the subsequence \(a^{ks+T}+b^{ks+T}\), and recovers the classical, oddly-good, and evenly-good cases as specializations [2605.27933].

## 1. Definition and foundational properties

For fixed coprime nonzero integers \(a,b\), the classical set of good integers is
\[
G(a,b)=\{\ell\ge 1:\exists k\ge 1\text{ such that }\ell\mid a^k+b^k\}.
\]
The basic edge case is \(\ell=1\), which is always good. If \(d\in G(a,b)\), then \(\gcd(a,d)=\gcd(b,d)=1\); thus every prime divisor of a good integer is coprime to both \(a\) and \(b\) [2508.19629].

Parity enters immediately. If \(ab\) is even, then every good integer is odd; no even \(\ell>1\) is good. If \(ab\) is odd, then \(2\) is good, and more generally
\[
2^\beta\in G(a,b)\iff 2^\beta\mid (a+b).
\]
The literature also distinguishes two subclasses. A positive integer \(\ell\) is oddly-good if \(\ell\mid a^k+b^k\) for some odd \(k\ge 1\), and evenly-good if \(\ell\mid a^k+b^k\) for some even \(k\ge 2\). One has
\[
G(a,b)=OG(a,b)\cup EG(a,b),
\]
and for \(\ell>2\), \(\ell\) cannot be both oddly-good and evenly-good [1611.04539].

These definitions are stable under sign normalization. Replacing \((a,b)\) by \((|a|,|b|)\) does not change the set of divisors of \(a^N+b^N\), so membership questions may be treated with \(a,b>0\) without loss for the divisibility problem in the coprime setting [2605.27933].

## 2. Order-theoretic characterization

The decisive local invariant is the multiplicative order. For an odd prime \(p\nmid ab\) and \(r\ge 1\), the existence of \(k\) with \(p^r\mid a^k+b^k\) is equivalent to
\[
-1\in \langle ab^{-1}\pmod{p^r}\rangle,
\]
equivalently to the statement that \(\operatorname{ord}_{p^r}(ab^{-1})\) is even. Order lifting at odd prime powers has the form
\[
\operatorname{ord}_{p^r}(ab^{-1})=\operatorname{ord}_{p}(ab^{-1})\cdot p^{i}
\quad\text{for some }i\ge 0,
\]
so the \(2\)-adic valuation of the order is already determined at the prime level [2508.19629].

For odd integers, the global criterion is Moree’s characterization. Let \(d>1\) be odd and define \(g:=ab^{-1}\) modulo the relevant odd primes. Then
\[
d\in G(a,b)\iff \exists s\ge 1\text{ such that }2^s\Vert \operatorname{ord}_p(g)\text{ for every prime }p\mid d.
\]
Thus the exact power of \(2\) dividing \(\operatorname{ord}_p(g)\) must be the same positive integer for all odd primes dividing \(d\) [1804.01916].

Writing \(\ell=2^\beta d\) with \(d\) odd yields the complete classification. If \(ab\) is odd, then \(\ell\in G(a,b)\) iff one of the following holds:
\[
\begin{aligned}
&\text{(a)}\ \beta\in\{0,1\}\text{ and }d=1,\\
&\text{(b)}\ \beta\in\{0,1\},\ d\ge 3,\text{ and }\exists s\ge 1\text{ such that }2^s\Vert \operatorname{ord}_p(g)\ \forall p\mid d,\\
&\text{(c)}\ \beta\ge 2,\ d=1,\text{ and }2^\beta\mid (a+b),\\
&\text{(d)}\ \beta\ge 2,\ d\ge 3,\ 2^\beta\mid (a+b),\text{ and }2\Vert \operatorname{ord}_p(g)\ \forall p\mid d.
\end{aligned}
\]
If \(ab\) is even, then \(\ell\in G(a,b)\) iff \(\beta=0\) and either \(d=1\), or \(d\ge 3\) and there exists \(s\ge 1\) such that \(2^s\Vert \operatorname{ord}_p(g)\) for every prime \(p\mid d\) [1804.01916].

This formulation separates the theory into two independent components: the odd part is governed by a uniform \(2\)-adic order condition, while the \(2\)-power part is governed by the explicit divisibility \(2^\beta\mid (a+b)\).

## 3. Oddly-good, evenly-good, and generalized subclasses

The subclasses \(OG(a,b)\) and \(EG(a,b)\) refine the order criterion. For odd \(d>1\),
\[
d\in OG(a,b)\iff 2\Vert \operatorname{ord}_p(g)\text{ for every prime }p\mid d,
\]
whereas
\[
d\in EG(a,b)\iff \exists s\ge 2\text{ such that }2^s\Vert \operatorname{ord}_p(g)\text{ for every prime }p\mid d.
\]
Thus oddly-good integers correspond exactly to the case of one factor of \(2\) in each relevant order, while evenly-good integers require at least two [1801.04614].

A further generalization fixes \(\beta\ge 0\). A positive integer \(d\) is \(2^\beta\)-good if \(2^\beta d\in G(a,b)\); similarly one defines \(2^\beta\)-oddly-good and \(2^\beta\)-evenly-good. If \(a,b\) are odd and \(\beta\ge 2\), then
\[
2^\beta d\in G(a,b)\iff 2^\beta\mid (a+b)\text{ and }2\Vert \operatorname{ord}_p(g)\text{ for every prime }p\mid d.
\]
Let \(y:=v_2(a+b)\). Then \(G(a,b)(\beta)=\varnothing\) if \(y<\beta\), and
\[
G(a,b)(0)\supseteq G(a,b)(1)\supseteq \cdots \supseteq G(a,b)(y)\supseteq G(a,b)(y+1)=\varnothing.
\]
For \(\beta\ge 2\), one has
\[
OG(a,b)(\beta)=G(a,b)(\beta),\qquad EG(a,b)(\beta)=\varnothing,
\]
so the higher \(2\)-power levels are entirely oddly-good [1801.04614].

The \((T,k)\)-framework extends the theory again. For fixed integers \(k\ge 1\) and \(0\le T<k\), a positive integer \(d\) is \((T,k)\)-good with respect to \((a,b)\) if
\[
d\mid a^{ks+T}+b^{ks+T}
\quad\text{for some }s\ge 1.
\]
The corresponding set is denoted \(G_{(T,k)}(a,b)\). The classical families are recovered by
\[
G_{(0,1)}(a,b)=G(a,b),\qquad G_{(0,2)}(a,b)=EG(a,b),\qquad G_{(1,2)}(a,b)=OG(a,b).
\]
At an odd prime power \(p^e\) with \(p\nmid ab\),
\[
p^e\in G_{(T,k)}(a,b)\iff \operatorname{ord}_p(ab^{-1})\text{ is even and }
T\equiv \frac{\operatorname{ord}_{p^e}(ab^{-1})}{2}\pmod{\gcd(k,\operatorname{ord}_{p^e}(ab^{-1}))}.
\]
For odd \(d>1\), the global criterion requires a common value \(\alpha\ge 1\) of \(v_2(\operatorname{ord}_p(ab^{-1}))\) across all primes \(p\mid d\), together with explicit congruence and divisibility conditions on \(T\). In the even case, assuming \(a,b\) are odd, one has \(2\in G_{(T,k)}(a,b)\) for all \(k,T\), and for \(\varepsilon\ge 2\),
\[
2^\varepsilon\in G_{(T,k)}(a,b)\iff \varepsilon\le v_2(a+b)\text{ and there exists }s\ge 1\text{ such that }ks+T\text{ is odd}
\]
[2605.27933].

## 4. Corrections, algorithms, and the non-coprime completion

The arithmetic theory underwent a significant correction in 2018. Two implications used in earlier papers were shown to be false. First,
\[
\operatorname{Ord}_{2^\beta}(ab^{-1})=2\ \Rightarrow\ ab^{-1}\equiv -1\pmod{2^\beta}
\]
is false; a counterexample is \(x=11\) modulo \(8\), for which \(\operatorname{Ord}_8(11)=2\) but \(11\not\equiv -1\pmod 8\). Second,
\[
\operatorname{Ord}_{d}(ab^{-1})=2k\ \Rightarrow\ (ab^{-1})^k\equiv -1\pmod d
\]
is false for odd composite \(d\) that are not prime powers; a counterexample is \(11\) modulo \(15\), since \(\operatorname{Ord}_{15}(11)=2\) but \(11\not\equiv -1\pmod{15}\). The corrected criteria replace these false implications by explicit parity and order conditions prime-by-prime [1804.01916].

Algorithmic decision procedures follow directly from the corrected structure. In the classical coprime case, one writes \(\ell=2^\beta d\), rejects immediately if \(\gcd(\ell,a)>1\) or \(\gcd(\ell,b)>1\), factors the odd part \(d\), computes \(v_2(\operatorname{ord}_p(ab^{-1}))\) for each prime \(p\mid d\), and then applies the case distinction for \(\beta\in\{0,1\}\) versus \(\beta\ge 2\). In the \((T,k)\)-setting, an explicit algorithm decides whether a given integer \(d\) is \((T,k)\)-good with respect to \((a,b)\) and, when it is, computes an exponent \(s\) such that
\[
d\mid a^{ks+T}+b^{ks+T};
\]
the method combines prime-power local tests, CRT aggregation, and the parity check at \(2\) [2605.27933].

A later completion treats the non-coprime case \(\gcd(A,B)\neq 1\). Write
\[
A=ga,\qquad B=gb,\qquad \gcd(a,b)=1,
\]
and for \(L\ge 1\) decompose
\[
L=\lambda_{\mathcal P(g)}(L)\cdot \ell,\qquad \gcd(\ell,g)=1.
\]
Define
\[
\gamma(L):=\max_{p\mid g}\left\lceil \frac{v_p(L)}{v_p(g)}\right\rceil.
\]
Then, for \(L\ge 2\), the following are equivalent: \(L\in G_{(A,B)}\); there exists \(\kappa\ge \gamma(L)\) with \(\ell\mid a^\kappa+b^\kappa\); and \(\ell\in G_{(a,b)}\). Thus the non-coprime problem reduces to a coprime “core” plus a \(p\)-adic threshold coming from \(g\) [2510.15290].

This extension also identifies the full set of admissible exponents. If \(L\in G_{(A,B)}\), then
\[
\mathcal K_{(A,B)}(L)
=
\{\,K\in\mathbb N:\ K\equiv r\pmod{L_0}\ \text{and}\ K\ge \gamma(L)\,\},
\]
where \(L_0=\operatorname{ord}_\ell(ab^{-1})\) and \(r=L_0/2\) when \(\ell\ge 3\). Hence all admissible exponents form a single arithmetic progression truncated below by the threshold \(\gamma(L)\) [2510.15290].

## 5. Applications in coding theory

Coding-theoretic applications are a principal reason for the sustained study of good integers. In abelian coding theory, good integers control when cyclotomic classes are self-paired under reciprocal symmetries. For a finite abelian group \(A\), a \(p^v\)-cyclotomic class \(S_{p^v}(a)\) is type I iff \(\operatorname{ord}(a)\in G(p^v,1)\), and in the Hermitian setting a \(p^{2v}\)-cyclotomic class is type I′ iff \(\operatorname{ord}(a)\in OG(p^v,1)\). These identifications lead to formulas for the average Euclidean and Hermitian hull dimensions of abelian codes, and to explicit bounds in terms of the counts of type I and type I′ classes [1611.04539].

Generalized \(2^\beta\)-good integers govern self-dual negacyclic codes. Let
\[
n=2^v p^r n',
\]
with \(v\ge 0\), \(r\ge 0\), \(n'\) odd, and \(p\nmid n'\). Over \(\mathbb F_{p^l}\), the reciprocity pattern of irreducible factors of \(x^n+1\) is controlled by \(G(p^l,1)(v+1)\). A Euclidean self-dual negacyclic code of length \(n\) over \(\mathbb F_{p^l}\) exists iff \(v>0\) and
\[
2^{v+1}\nmid (p^l+1).
\]
Under this condition, the number of such codes is
\[
NE(p^l,n)=\prod_{d\mid n'}(p^r+1)^{\phi(d\,2^{v+1})/\operatorname{ord}_{d\,2^{v+1}}(p^l)},
\]
and otherwise \(NE(p^l,n)=0\). The Hermitian analogue over \(\mathbb F_{p^{2l}}\) satisfies the same existence condition and has enumeration
\[
NH(p^{2l},n)=\prod_{d\mid n'}(p^r+1)^{\phi(d\,2^{v+1})/\operatorname{ord}_{d\,2^{v+1}}(p^{2l})},
\]
with value \(0\) when \(2^{v+1}\mid (p^l+1)\) [1801.04614].

The \((T,k)\)-generalization extends these ideas from Euclidean and Hermitian duality to Galois duality. Specializing to \((a,b)=(q,1)\), the divisors of
\[
q^{ks+T}+1
\]
control the reciprocal structure of \(x^n-1\) over \(\mathbb F_{q^k}\). For a \(q^k\)-cyclotomic class \(Q\subset \mathbb Z_n\), the corresponding irreducible factor satisfies
\[
f_Q^{*,\theta}(x)=f_{-q^TQ}(x),
\]
so \(f_Q\) is \(\theta\)-self-reciprocal iff \(Q=-q^TQ\). The arithmetic bridge is that a class is of type \(T\) iff the relevant order belongs to \(G_{(T,k)}(q,1)\). This yields a description and enumeration of Galois LCD cyclic codes, with the number of \(\theta\)-LCD cyclic codes equal to
\[
2^{|\Omega_1|+|\Omega_2|},
\]
and it yields a characterization of Galois self-dual cyclic codes. Existence of a \(\theta\)-self-dual cyclic code is equivalent to \(q\) and \(n\) being even [2605.27933].

Across these applications, the same arithmetic data recur: multiplicative orders modulo prime powers, uniform \(2\)-adic valuations, and the distinction between self-paired and paired cyclotomic factors.

## 6. Terminological scope and adjacent usages

The phrase “good integers” is not unique across current arXiv literature. In ergodic theory, a strictly increasing sequence \(S=(s_1<s_2<\cdots)\) is called good if for every real \(\alpha\) the limit
\[
\lim_{N\to\infty}\frac1N\sum_{n\le N}\mathbf e(s_n\alpha)
\]
exists. By the Riesz representation theorem, this is equivalent to the existence of an asymptotic distribution modulo \(1\), and by the spectral theorem it is equivalent to \(L^2\)-convergence of ergodic averages along \(S\) in every probability measure preserving system [2210.02233]. This notion concerns sequences of times, not divisors of \(a^k+b^k\).

A related dynamical paper studies collections of sequences that are “good for liminf-\(\ell\)-recurrence,” meaning that for every measure-preserving system and every set \(A\) of positive measure,
\[
\liminf_{N\to\infty}\frac{1}{N}\sum_{n=1}^N
\mu\big(A\cap T^{-a_1(n)}A\cap\cdots\cap T^{-a_\ell(n)}A\big)>0.
\]
There, “good” refers to recurrence and characteristic factors, again rather than the arithmetic divisibility problem [2009.07677].

In pseudorandom number generation, the phrase appears in a third sense: “good integers” can denote multipliers \(a\) that have good performance with respect to the spectral test for congruential generators. The criterion there is a lattice figure of merit, not the existence of \(k\) with \(\ell\mid a^k+b^k\) [2001.05304].

For number theory and coding theory, however, the standard meaning remains the classical one: positive integers divisible by some term of the sequence \(a^k+b^k\), together with the refined families \(OG\), \(EG\), \(2^\beta\)-good, and \((T,k)\)-good. Within that framework, the subject now comprises a corrected coprime theory, an explicit non-coprime completion, algorithmic tests, and a wide array of applications to Euclidean, Hermitian, and Galois dualities in algebraic coding theory [2510.15290].

Source: https://www.emergentmind.com/topics/good-integers