1 Introduction
A positive integer is called a Niven number (or Harshad number) in a given base if it is divisible by the sum of its digits in that base. These numbers were introduced in the decimal setting by Kaprekar [Reference Kaprekar8] and have since been studied from a variety of analytic and combinatorial perspectives (see [Reference Cai1–Reference Grundman6, Reference Kennedy and Cooper9–Reference Kennedy, Goodman and Best11, Reference Sanna13, Reference Witno15]).
Recently, Harrington et al. [Reference Harrington, Litman and Wong7] proved that every arithmetic progression contains infinitely many base-b Niven numbers for any fixed
$b\ge 2$
. Inspired by their analysis, we investigate a variation of their question for certain simultaneous Niven conditions in multiple bases.
We treat a particular structured two-base version of the problem for the pair of bases
$\{b,B\}$
, where
$B=b^k$
is a power of b. For a single base b, a multiplicative-order repunit argument already gives an elementary proof of infinitude in any arithmetic progression whose common difference is relatively prime to the base. We show how to combine that idea with a digit-sum compatibility construction—a version of Witno’s ‘sparse repunits’ [Reference Witno15]—to obtain explicit simultaneous b- and
$b^k$
-Niven numbers in every such progression. As a corollary, we show that it is possible to force Niven-ness in arithmetic progressions simultaneously for any (finite) number of powers of b.
The restriction to power-related bases is not merely a convenience, but reflects a genuine structural simplification. When
$B=b^k$
, each base-B digit corresponds to a block of k base-b digits, so by arranging for the base-B digits to be small (indeed, in
$\{0,1,\ldots ,b-1\}$
), we can ensure that passing from base B to base b creates no carries across blocks and, hence, preserves digit sums. This digit-block compatibility provides a concrete mechanism for linking Niven conditions across the two bases. Our approach exploits this linkage together with a multiplicative-order ‘repunits with gaps’ construction that simultaneously forces the desired residue class modulo m and divisibility by a prescribed digit sum.
1.1 Main result
For positive integers
$m\ge 1$
and r with
$0\le r<m$
, we write
for the arithmetic progression
$r+t\cdot m$
. We denote the sum of the base b digits of n by
$\mathsf {s}_b(n)$
.
Theorem 1.1. Let
$b \ge 2$
and
$k \ge 1$
be integers, and set
$B = b^k$
. If
$m\ge 1$
is such that
$\gcd (m,b)=1$
, then for any r with
$0\le r<m$
, there exist infinitely many integers
${n \in S_{m,r}}$
such that
that is, there are infinitely many n in the arithmetic progression
$S_{m,r}$
that are simultaneously b- and
$b^k$
-Niven. Moreover, for any
$s_0\geq 1$
, there exists such an n with
$\mathsf {s}_b(n) =\mathsf {s}_B(n) \geq s_0$
.
2 Preliminaries
2.1 Digit sums and base expansions
For an integer base
$g\ge 2$
, every positive integer c has a unique base-g expansion
$$ \begin{align*} c=\sum_{i=0}^{L} d_i g^i,\quad d_i\in\{0,1,\ldots,g-1\},\ d_L\ne 0; \end{align*} $$
in this case, the sum of the base-g digits of c is
$$ \begin{align*} \mathsf{s}_g(c)=\sum_{i=0}^{L} d_i. \end{align*} $$
For convenience, we set
$\mathsf {s}_g(0)=0$
. We say that c is g-Niven if
$\mathsf {s}_g(c)\mid c$
.
We also write
$$ \begin{align*} \operatorname{\mathrm{rad}}(c):=\prod_{\substack{p\mid c\\ p\text{ prime}}} p \end{align*} $$
for the radical of an integer
$c\ge 1$
, that is, the product of the distinct prime divisors of c, with the convention that
$\operatorname {\mathrm {rad}}(1)=1$
.
2.2 Compatibility between bases b and
$B=b^k$
For power-related bases b and
$B=b^k$
, a base-B digit occupies a block of k base-b digits. The following elementary observation linking those digit blocks is central to our construction.
Proposition 2.1. Let
$b\ge 2$
and
$k\ge 1$
be integers, and set
$B=b^k$
. Suppose that n admits a base-B expansion of the form
$$ \begin{align*} n=\sum_{i=0}^{L} d_i B^i \quad \text{with}\ d_i\in\{0,1,\ldots,b-1\}\ \text{ for all } i \text{ and } d_L\ne 0. \end{align*} $$
Then,
$$ \begin{align*} \mathsf{s}_b(n)=\mathsf{s}_B(n)=\sum_{i=0}^{L} d_i. \end{align*} $$
Proof. We write
$B^i=b^{ki}$
, so
$$ \begin{align*} n=\sum_{i=0}^{L} d_i b^{ki}. \end{align*} $$
Since
$0\le d_i\le b-1$
, the base-b expansion of
$d_i b^{ki}$
consists of a single digit
$d_i$
in position
$ki$
and
$0$
s elsewhere. The positions
$ki$
are distinct, so when summing over i, each base-b position receives at most one nonzero digit and therefore no carries occur. Hence, the base-b digit sum equals
$\sum _i d_i$
. The base-B digit sum is also
$\sum _i d_i$
by definition.
Remark 2.2. More generally, if
$n=\sum _{i=0}^{L} d_i B^i$
is the base-B expansion with digits
$d_i$
such that
$0\le d_i<B=b^k$
, then expanding each coefficient
$d_i$
in base b uses at most k digits, occupying the block of positions
$ki,ki+1,\ldots ,ki+k-1$
; these blocks are disjoint for different i, so no carries occur between them. Consequently,
$$ \begin{align*} \mathsf{s}_b(n)=\sum_{i=0}^{L} \mathsf{s}_b(d_i). \end{align*} $$
Proposition 2.1 is the special case in which
$d_i<b$
for all i, so that
$\mathsf {s}_b(d_i)=d_i$
.
2.3 Multiplicative order
For integers
$a\in \mathbb {Z}$
and
$N\ge 1$
with
$\gcd (a,N)=1$
, the multiplicative order of a modulo N is
$\operatorname {\mathrm {ord}}_N(a)$
exists by finiteness of
$(\mathbb {Z}/N\mathbb {Z})^\times $
whenever
$N\ge 2$
. (When
$N=1$
, the congruence
$a^\omega \equiv 1\pmod {1}$
holds for all
$\omega $
and the definition gives
$\operatorname {\mathrm {ord}}_1(a)=1$
.)
We also use the Chinese remainder theorem (CRT) in the standard form: if
$\gcd (M_1,M_2)=1$
, then for any residues
$x_1\pmod {M_1}$
and
$x_2\pmod {M_2}$
, there exists a unique residue class
$x\pmod {M_1M_2}$
satisfying both congruences (see, for example, [Reference Niven, Zuckerman and Montgomery12, Section 2.3]).
3 The construction
We now introduce our simultaneous Niven number construction. Throughout, fix integers
$b\ge 2$
and
$k\ge 1$
, set
$B=b^k$
, and fix an arithmetic progression
$S_{m,r}$
with
$m\ge 1$
,
$0\le r<m$
and
$\gcd (m,b)=1$
.
Step 1: admissible digit sums. We choose integers
$s\ge 1$
simultaneously satisfying
we call such s admissible.
Step 2: the spacing parameter. Since
$B=b^k$
, we have
$\gcd (B,ms)=1$
if and only if
$\gcd (b,ms)=1$
. For each admissible s, the hypothesis that
$\gcd (s,b)=1$
thus implies
$\gcd (ms,b)=1$
, given that we have chosen m and b such that
$\gcd (m,b)=1$
. Hence, we can define
Step 3: a sparse repunit in base B. Define
$$ \begin{align} n_s:=\sum_{j=0}^{s-1} B^{j\omega_s}; \end{align} $$
equivalently, since the sum is geometric,
We prove in Proposition 4.1 that
$n_s\equiv r\pmod {m}$
,
$\mathsf {s}_b(n_s)=\mathsf {s}_B(n_s)=s$
and
$s\mid n_s$
; that is, for any admissible s, the constructed integer
$n_s$
is simultaneously b-Niven and B-Niven. We then complete the proof of Theorem 1.1 in Section 5 by showing that there are infinitely many admissible s.
Remark 3.1. By construction, the integer
$n_s$
in (3.3) is the length-s repunit in the auxiliary base
$B^{\omega _s}$
, that is,
Equivalently, in base B, it is a sparse repunit, with
$1$
s separated by gaps of length
${\omega _s-1}$
. This point of view connects our construction to the study of generalised repunits by Witno [Reference Witno15] (see also [Reference Witno14]). In Witno’s notation (which slightly overloads with ours, so we adopt it only temporarily for this remark): for integers
$n\ge 1$
,
$k\ge 1$
and base
$b\ge 2$
, we set
$$ \begin{align*} R_{n,b,k}:=\sum_{j=0}^{n-1} b^{jk}=\frac{b^{nk}-1}{b^k-1}, \end{align*} $$
which in base b is a string of
$n\ 1$
s separated by blocks of
$k-1\ 0$
s; equivalently,
${R_{n,b,k}=R_{n,b^k}}$
is a generalised repunit in base
$b^k$
. Our
$n_s$
is precisely of Witno’s form with base b replaced by B and gap parameter k replaced by
$\omega _s$
.
Witno’s Theorem 4.2 gives a multiplicative order criterion for when such sparse repunits are b-Niven. In contrast, we choose the spacing
$\omega _s=\operatorname {\mathrm {ord}}_{ms}(B)$
so that
which forces the congruence
$n_s\equiv s\pmod {ms}$
and hence,
$s\mid n_s$
, while simultaneously enforcing the arithmetic progression constraint
$n_s\equiv r\pmod {m}$
.
Remark 3.2. We note also that any positive integer
$\omega $
with
$B^\omega \equiv 1\pmod {m}$
and
$B^\omega \equiv 1\pmod {s}$
suffices for the congruence computations below; taking
$\omega _s=\operatorname {\mathrm {ord}}_{ms}(B)$
as in (3.2) is a convenient canonical choice guaranteeing these congruences (indeed, the stronger congruence
$B^{\omega _s}\equiv 1\pmod {ms}$
).
4 Verification of the desired properties
Proposition 4.1. Assume that s satisfies (3.1), and define
$\omega _s$
and
$n_s$
by (3.2) and (3.3), respectively. Then:
-
(1)
$n_s\equiv r\pmod {m}$
, so
$n_s\in S_{m,r}$
; -
(2)
$\mathsf {s}_B(n_s)=\mathsf {s}_b(n_s)=s$
; -
(3)
$s\mid n_s$
.
In particular,
$n_s$
is simultaneously b-Niven and B-Niven.
Proof. As
$\omega _s=\operatorname {\mathrm {ord}}_{ms}(B)$
, by construction, we have
$B^{\omega _s}\equiv 1\pmod {ms}$
. Hence, for every
$j\ge 0$
,
Expanding (3.3) modulo
$ms$
using (4.1) gives
$$ \begin{align} n_s=\sum_{j=0}^{s-1} B^{j\omega_s}\equiv \sum_{j=0}^{s-1} 1= s \pmod{ms}. \end{align} $$
Reducing (4.2) modulo m yields
$n_s\equiv s\pmod {m}$
and since
$s\equiv r\pmod {m}$
, we obtain
$n_s\equiv r\pmod {m}$
, proving (1). Reducing (4.2) modulo s instead yields
proving (3).
For (2), in the base-B expansion of
$n_s$
, the summands are distinct powers of B with coefficient
$1$
, so no carries occur in base B: there are
$1$
s in positions
$0,\omega _s,2\omega _s,\ldots , (s-1)\omega _s$
and
$0$
s in all other positions. It follows that
$\mathsf {s}_B(n_s)=s$
. Since all base-B digits of
$n_s$
lie in
$\{0,1\}\subseteq \{0,1,\ldots ,b-1\}$
, Proposition 2.1 then gives
$\mathsf {s}_b(n_s)=\mathsf {s}_B(n_s)=s$
.
5 Infinitude of the admissible s
It remains to show that admissible s exist infinitely often and that the resulting
$n_s$
are distinct.
Lemma 5.1. For any
$b\ge 2$
and
$m\ge 1$
with
$\gcd (m,b)=1$
, there exist infinitely many integers
$s\ge 1$
satisfying (3.1) for any residue class
$r\pmod {m}$
. Moreover, for any
${s_0\geq 1}$
, there exists such an s with
$s\geq s_0$
.
Proof. Setting
$q:=\operatorname {\mathrm {rad}}(b)$
, we have
$\gcd (m,q)=1$
because
$\gcd (m,b)=1$
. By the CRT, the simultaneous congruences
have a solution
$s\equiv s^\ast \pmod {mq}$
. Let
$s^\ast $
denote the least positive integer in that residue class. Every integer
then satisfies
$s\equiv r\pmod {m}$
and
$s\equiv 1\pmod {q}$
; hence, for such s, we have
$\gcd (s,q)=1$
. Since q has the same prime divisors as b, this implies
$\gcd (s,b)=1$
. Taking t arbitrarily large yields infinitely many admissible s; by choosing t large enough, we can ensure that
$s\ge s_0$
.
Lemma 5.2. If s and
$s'$
are distinct admissible integers, then
$n_s\ne n_{s'}$
.
Proof. We prove the contrapositive: if
$n_s=n_{s'}$
, then a priori,
However, by Proposition 4.1(2), we have
$\mathsf {s}_B(n_s)=s$
and
$\mathsf {s}_B(n_{s'})=s'$
; hence, (5.1) implies that
$s=s'$
.
Proof of Theorem 1.1
By Lemma 5.1, there exist infinitely many admissible integers s. For each such s, Proposition 4.1 shows that
$n_s\in S_{m,r}$
and, moreover,
$n_s$
is simultaneously b-Niven and B-Niven. Lemma 5.2 shows the
$n_s$
associated to admissible s are all distinct, giving infinitely many integers with the desired properties.
For the strengthening, given
$s_0\ge 1$
, we choose an admissible
$s\ge s_0$
(which exists by Lemma 5.1). Proposition 4.1(2) then gives
$\mathsf {s}_b(n_s)=\mathsf {s}_B(n_s)=s\ge s_0$
, as desired.
6 An illustrative example
Take
$b=2$
,
$k=3$
, so
$B=b^k=8$
. Let
$m=5$
and
$r=3$
. We choose
$s\equiv 3\pmod {5}$
and
$\gcd (s,2)=1$
; the smallest such choice is
$s=3$
. We have
and since
$8^2\not \equiv 1\pmod {15}$
, we have
$\omega _s=4$
.
The construction then gives
Now,
$n_s\equiv 3\pmod {5}$
, so
$n_s\in S_{5,3}$
. Also, since
$8^4\equiv 1\pmod {3}$
, we have
so
$3\mid n_s$
.
In base
$8$
, we have
hence,
$\mathsf {s}_8(n_s)=3$
as expected. In base
$2$
,
with exactly three
$1$
s (at positions
$0$
,
$12$
and
$24$
); hence,
$\mathsf {s}_2(n_s)=3$
.
Thus, we see that
$n_s$
is simultaneously
$2$
-Niven and
$8$
-Niven, and lies in the progression
$n\equiv 3\pmod {5}$
.
7 Concluding remarks
We have proven that for every pair of power-related bases
$\{b,b^k\}$
and every arithmetic progression
$S_{m,r}$
with
$\gcd (m,b)=1$
, there are infinitely many integers in
$S_{m,r}$
that are simultaneously b-Niven and
$b^k$
-Niven. The argument is elementary and rests on two simple ideas:
-
(1) digit-sum compatibility for bases b and
$b^k$
when base-
$b^k$
digits lie in
$\{0,\ldots ,b-1\}$
; -
(2) congruence forcing via multiplicative order to ensure both the prescribed progression and divisibility by the chosen digit sum.
Theorem 1.1 only asks for
$\mathsf {s}_b(n)\mid n$
and
$\mathsf {s}_B(n)\mid n$
, with no relationship required between
$\mathsf {s}_b(n)$
and
$\mathsf {s}_B(n)$
. Yet, our construction yields the stronger property
because the base-B digits are chosen to lie in
$\{0,1\}\subseteq \{0,1,\ldots ,b-1\}$
, allowing the digit-sum compatibility obtained in Proposition 2.1. This feature appears to be an artefact of the method, but it is convenient and may be useful in other simultaneous-base questions.
We note also that our proof of Theorem 1.1 is completely explicit: for a chosen admissible s, we compute
$\omega _s=\operatorname {\mathrm {ord}}_{ms}(B)$
and then construct
$n_s$
via (3.3). The resulting integers grow very rapidly (roughly of the order of
$B^{(s-1)\omega _s}$
), so this is not an efficient enumeration method, but it does yield a concrete infinite family and a constructive existence proof.
7.1 Relation to the order–repunit method in the coprime case
For a fixed base b and modulus coprime to b, using multiplicative order to force congruences is standard. In particular, for a chosen integer s with
$\gcd (s,b)=1$
, setting
$$ \begin{align} \omega_s^{(b)}:=\operatorname{\mathrm{ord}}_{ms}(b), \quad n_s^{(b)}:=\sum_{j=0}^{s-1} b^{j\omega_s^{(b)}} \end{align} $$
gives
$b^{\omega _s^{(b)}}\equiv 1\pmod {ms}$
, and so
$n_s^{(b)}\equiv s\pmod {ms}$
and
$\mathsf {s}_b(n_s^{(b)})=s$
. Choosing
$s\equiv r\pmod {m}$
then places
$n_s^{(b)}$
in a prescribed arithmetic progression. (This is precisely the special case
$k=1$
of Theorem 1.1.)
The present construction is a structured refinement of this idea, using B instead of b in (7.1). Thus, as noted in Remark 3.1,
$n_s$
is a length-s repunit in the auxiliary base
$B^{\omega _s}$
, appearing in base B as a sparse repunit (see [Reference Witno15]) with digits equal to
$1$
. As in the single-base–coprime-case argument, multiplicative order enforces the required congruences, but here, the power-related structure additionally allows the same sparse repunit to have identical digit sums in bases b and B.
7.2 Extension to multiple power-related bases
If
$\ell $
is a positive divisor of k, then the integers
$n_s$
constructed in our proof of Theorem 1.1 are automatically
$b^\ell $
-Niven. Indeed, writing
$k=\ell t$
gives
$$ \begin{align*} n_s=\sum_{j=0}^{s-1} b^{kj\omega_s}=\sum_{j=0}^{s-1}(b^\ell)^{tj\omega_s}, \end{align*} $$
so the base-
$b^\ell $
expansion of
$n_s$
has exactly s digits equal to
$1$
, and thus,
$\mathsf {s}_{b^\ell }(n_s)=s$
.
In our numerical example in Section 6, we also have
$n_s=(1000001000001)_4$
, so that
$n_s$
is
$4$
-Niven in addition to being
$2$
- and
$8$
-Niven. Here,
$4=2^2$
and
$\ell =2$
does not correspond to a divisor of
$k=3$
, so this additional
$4$
-Niven-ness is an arithmetical coincidence. In general, applying the construction given for
$\{b,b^k\}$
does not guarantee
$b^{\ell }$
-Niven-ness for intermediate exponents
$\ell $
with
$\ell \nmid k$
. For instance, again take
$b=2$
and
$k=3$
(so
$B=8$
), and choose
$m=1$
and
$s=7$
. Then,
$\omega _s=\operatorname {\mathrm {ord}}_{7}(8)=1$
, so the construction gives
which is simultaneously
$2$
- and
$8$
-Niven:
with
$\mathsf {s}_2(299593)=\mathsf {s}_8(299593)=7$
by construction. However,
$299593=(1021021021)_4$
with
$\mathsf {s}_4(299593)=10\nmid 299593$
, so
$n_s$
is not
$4$
-Niven.
Nevertheless, the divisibility observation above implies that an extension of our construction makes it possible to pick up any finite collection of power-related bases
$\{b,b^2,\ldots ,b^k\}$
.
Corollary 7.1. Let
$b \ge 2$
and
$k \ge 1$
be integers, and put
$K=\operatorname {\mathrm {lcm}}(1,2,\ldots ,k)$
. If
$m\ge 1$
is such that
$\gcd (m,b)=1$
, then for any r with
$0\le r<m$
, there exist infinitely many integers
$n \in S_{m,r}$
that are
$b^{\ell }$
-Niven for all
$\ell $
with
$1\le \ell \le k$
. Moreover, for every
$s_0\ge 1$
, there exists such an n with
Proof. We fix
$s_0\ge 1$
and choose an admissible
$s\ge s_0$
as in Lemma 5.1, so that
${s\equiv r\pmod {m}}$
and
$\gcd (s,b)=1$
.
We set
$\overline {B}:=b^K$
and define
$$ \begin{align*} \Omega_s=\operatorname{\mathrm{ord}}_{ms}(\overline{B}), \quad N_s:=\sum_{j=0}^{s-1} \overline{B}^{j\Omega_s} \end{align*} $$
(note that
$\operatorname {\mathrm {ord}}_{ms}(\overline {B})$
exists because
$\gcd (\overline {B},ms)=1$
). By construction,
$\overline {B}^{\Omega _s}\equiv 1\pmod {ms}$
, so the same argument as in the proof of Proposition 4.1 gives
$N_s\equiv s\equiv r\pmod {m}$
and
$s\mid N_s$
.
Now, we fix
$\ell \in \{1,2,\ldots ,k\}$
. Since
$\ell \mid K$
, we can write
Thus, we see that
$$ \begin{align*} N_s=\sum_{j=0}^{s-1}(b^\ell)^{(K/\ell)j\Omega_s} \end{align*} $$
is a sum of distinct powers of
$b^\ell $
, each with coefficient
$1$
; hence, the base-
$b^\ell $
expansion of
$N_s$
has exactly s digits equal to
$1$
and no carries, so
$\mathsf {s}_{b^\ell }(N_s)=s$
. Since also
$s\mid N_s$
, it follows that
$\mathsf {s}_{b^\ell }(N_s)\mid N_s$
; this holds for every
$\ell =1,\ldots ,k$
, as desired.
Finally, distinct admissible s chosen in this way yield distinct integers
$N_s$
since
$\mathsf {s}_b(N_s)=s$
; the infinitude claim then follows by taking larger and larger
$s_0$
.
7.3 Potential for further extensions
Our construction relies on choosing
$\omega _s$
so that
$B^{\omega _s}\equiv 1\pmod {m}$
and, hence,
$B^{j\omega _s}\equiv 1\pmod {m}$
for all j. Corollary 7.1 shows that the same construction can simultaneously handle several bases that are all powers of a common base b, provided the exponents are taken from a finite set. However, if a prime p divides both m and b, then
$p\mid B$
and so
$B^\ell \equiv 0\pmod {p}$
for every
$\ell \ge 1$
, making it impossible for us to attain
$B^{\omega _s}\equiv 1\pmod {m}$
. Thus, the assumption
$\gcd (m,b)=1$
is not merely technical: it is required for the particular congruence-forcing mechanism used here.
Harrington et al. [Reference Harrington, Litman and Wong7] proved that every arithmetic progression—not just those with
$\gcd (m,b)=1$
—contains infinitely many b-Niven numbers for any single base
$b \geq 2$
; this suggests it is at least plausible that the relative primality hypothesis in Theorem 1.1 could be relaxed. We also might hope to simultaneously attain Niven-ness across sets of non-power-related bases, but this would seem to require new ideas for linking the structure across bases.
Acknowledgements
I gratefully acknowledge helpful comments from Ben Golub, Steven J. Miller, Ken Ono and Jesse Shapiro, and I particularly thank the anonymous referee for an especially close reading. Part of this work was conducted while I was visiting the Technological Innovation, Entrepreneurship, and Strategic Management (TIES) group at the MIT Sloan School of Management; I greatly appreciate their hospitality.
I used LLMs to assist with some of the computations in the preparation of this article, particularly GPT-5.2 Pro and Claude Sonnet 4.5 (both accessed via Poe with the support of Quora, where I am an advisor). The problem, methods and eventual written form are my own; and of course, any errors remain my responsibility.



