You are on page 1of 9

EVERY NATURAL NUMBER IS THE SUM

OF FORTY-NINE PALINDROMES

arXiv:1508.04721v1 [math.NT] 19 Aug 2015

WILLIAM D. BANKS
Abstract. It is shown that the set of decimal palindromes is an additive basis
for the natural numbers. Specifically, we prove that every natural number can
be expressed as the sum of forty-nine (possibly zero) decimal palindromes.

1. Statement of result
Let N .. t0, 1, 2, . . .u denote the set of natural numbers (including zero).
Every number n P N has a unique decimal representation of the form
n

L1

10j j ,

(1.1)

j0

where each digit j belongs to the digit set


D .. t0, 1, 2, . . . , 9u,
and the leading digit L1 is nonzero whenever L 2. In what follows, we use
diagrams to illustrate the ideas; for example,
n L1

1 0

represents the relation (1.1). The integer n is said to be a palindrome if its digits
satisfy the symmetry condition
j L1j

p0 j Lq.

Denoting by P the collection of all palindromes in N, the aim of this note is to


show that P is an additive basis for N.

Date: August 20, 2015.


1

W. D. BANKS

Theorem 1.1. The set P of decimal palindromes is an additive basis for the natural
numbers N. Every natural number is the sum of forty-nine (possibly zero) decimal
palindromes.
The proof is given in the next section. It is unlikely that the second statement is optimal; a refinement of our method may yield an improvement. No
attempt has been made to generalize this theorem to bases other than ten; for
large bases, this should be straightforward, but small bases may present new
obstacles (for example, obtaining the correct analogue of Lemma 2.4 may be
challenging in the binary case, where the only nonzero digit is the digit one).
We remark that arithmetic properties of palindromes (in various bases) have
been previously investigated by many authors; see [114] and the references
therein.

2. The proof
2.1. Notation. For every n P N, let Lpnq (the length of n) denote the number
of decimal digits L in the expansion (1.1); in particular, Lp0q .. 1.
For any P N and d P D, we denote
$

if 0;

&0
(2.1)
p pdq .. d
if 1;

%101 d ` d
if 2.
Note that p pdq is a palindrome, and Lpp pdqq if d 0. If 2, then the
decimal expansion of p pdq has the form
p pdq d 0 0 d
with 2 zeros nested between two copies of the digit d.
More generally, for any integers k 0 and d P D, let
$

if k;

&0
k
p,k pdq .. 10 pk pdq 10k d
if k ` 1;

%101d ` 10k d
if k ` 2.
If k ` 2, then the decimal expansion of p,k pdq has the form
p,k pdq d 0 0 d 0 0
with k 2 zeros nested between two copies of the digit d, followed by k
copies of the digit zero.
Next, for any integers , k P N, k ` 4, and digits a, b P D, we denote
q,k pa, bq .. p,k paq ` p1,k pbq 101 a ` 102 b ` 10k pa ` bq.

(2.2)

EVERY NATURAL NUMBER IS THE SUM OF FORTY-NINE PALINDROMES

Taking into account that the relation n 10 tn{10u ` 0 pnq holds for every
natural number n 100, where tu is the floor function and 0 prq denotes the
ones digit of any natural number r, one sees that the decimal expansion of
q,k pa, bq has the form
q,k pa, bq a b 0 0 tpa ` bq{10u 0 pa ` bq 0 0
with k4 zeros nested between the digits a, b and the digits of a`b, followed
by k copies of the digit zero. For example, q10,2 p7, 8q 7800001500.
Finally, for any integers , k P N, k ` 4, and digits a, b, c P D, a 0, we
denote by N,k pa, b; cq the set of natural numbers described as follows. Given
L1
n P N, let L and tj uj0
be defined as in (1.1). Then N,k pa, b; cq consists of
those integers n for which L , 1 a, 2 b, k c, and 10k | n. In
other words, N,k pa, b; cq is the set of natural numbers n that have a decimal
expansion of the form
n a b c 00
with k 3 arbitrary digits nested between the digits a, b and the digit c,
followed by k copies of the digit zero. We reiterate that a 0.
2.2. Handling small integers. Let f : D D be the function whose values
are provided by the following table:
d
f pdq

0 1 2 3 4 5 6 7 8 9
0 1 9 8 7 6 5 4 3 2

We begin our proof of Theorem 1.1 with the following observation.


Lemma 2.1. Every number f pdq is a palindrome, and 10j d f pdq is a palindrome for
every integer j 1.
Proof. This is easily seen if d 0 or j 1. For j 2 and d 1, the number
10j df pdq 10j 1 is a repunit of the form 9 9, hence a palindrome. Finally,
for j 2 and 2 d 9, the number 10j d f pdq is a palindrome that has a
decimal expansion of the form
10j d f pdq d 1 9 9 d 1
with j 2 nines nested between two copies of the digit d 1.

Lemma 2.2. If n is a natural number with at most K nonzero decimal digits, then n
is the sum of 2K ` 1 palindromes.
Proof. Starting with the expansion (1.1) we write

n 0 `
10j j ,
jPJ

W. D. BANKS

where

(
J .. 1 j L : j 0 .

Since

n 0 `

f pj q `

jPJ

jPJ

10j j f pj q ,

(2.3)

Lemma 2.1 implies that n is the sum of 2|J | ` 1 palindromes. Since zero is a
palindrome, we obtain the stated result by adding 2K 2|J | additional zeros
on the right side of (2.3).

Lemma 2.2 implies, in particular, that n P N is a sum of 49 palindromes
whenever Lpnq 24. Therefore, we can assume that Lpnq 25 in the sequel.
2.3. Reduction to N,0p5` ; cq. Recall the definition of N,k pa, b; cq given in 2.1.
For any given integers , k P N, k ` 4, and a digit c P D, we now denote

N,k p5` ; cq ..
N,k pa, b; cq.
a,bPD
a5

L1
The set N,k p5` ; cq can be described as follows. For each n P N, let L and tj uj0
be defined as in (1.1). The set N,k p5` ; cq consists of those integers n for which
L , 1 5, k c, and 10k | n. In other words, N,k p5` ; cq is the set of
natural numbers n that have a decimal expansion of the form

n a c 00
with k 2 arbitrary digits nested between the digit a ( 5) and the digit c,
followed by k copies of the digit zero.
Lemma 2.3. Let n P N, and put L .. Lpnq as in (1.1). If L 5, then n is the sum of
two palindromes and an element of N,0 p5` ; cq with some P tL 1, Lu and c P D.
L1
Proof. Let tj uj0
be defined as in (1.1). If the leading digit L1 exceeds four,
`
then n P NL,0 p5 ; 0 q, and there is nothing to prove (since zero is a palindrome).
Now suppose that L1 4. Put m .. 10L1 ` L2 6, and observe that
4 m 43. If 4 m 9, then using (2.1) we see that

n pL1 pmq n p10L2m ` mq

L1

10j j 10L2 p10L1 ` L2 6q m

j0

6 10

L2

L3

10j j m,

j0

and the latter number evidently lies in NL1,0 p5` ; cq, where c p0 mq mod 10.
Since pL1 pmq is a palindrome, this yields the desired result for 4 m 9.

EVERY NATURAL NUMBER IS THE SUM OF FORTY-NINE PALINDROMES

In the case that 10 m 43, we write m 10a ` b with digits a, b P D,


a 0. Using (2.2) we have
n qL,0 pa, bq n p10L1 a ` 10L2 b ` a ` bq
n p10L2 m ` a ` bq

L1

10j j 10L2 p10L1 ` L2 6q a b

j0

6 10

L2

L3

10j j a b,

j0

and the latter number lies in NL1,0 p5` ; cq, where c p0 a bq mod 10. Since
qL,0 pa, bq is the sum of two palindromes, we are done in this case as well.

2.4. Inductive passage from N,k p5` ; c1 q to N1,k`1 p5` ; c2 q.
Lemma 2.4. Let , k P N, k ` 6, and c P D be given. Given n P N,k p5` ; c1 q, one
can find digits a1 , . . . , a18 , b1 , . . . , b18 P Dzt0u and c2 P D such that the number
n

18

q1,k paj , bj q

j1

lies in the set N1,k`1p5` ; c2 q.


1
Proof. Fix n P N,k p5` ; c1 q, and let tj uj0
be defined as in (1.1) (with L .. ).
Let m be the three-digit integer formed by the first three digits of n; that is,

m .. 1001 ` 102 ` 3 .
Clearly, m is an integer in the range 500 m 999, and we have
n

10 j 10

m`

10j j .

(2.4)

jk

jk

Let us denote
S .. t19, 29, 39, 49, 59u.
In view of the fact that
9S .. S ` ` S t171, 181, 191, . . . , 531u,
nine copies

it is possible to find an element h P 9S for which m 80 2h m 60. With


h fixed, let s1 , . . . , s9 be elements of S such that
s1 ` ` s9 h.
Finally, let 1 , . . . , 9 be natural numbers, each equal to zero or two: j P t0, 2u
for j 1, . . . , 9. A specific choice of these numbers is given below.

W. D. BANKS

We now put
tj .. sj ` j

tj`9 .. sj j

and

pj 1, . . . , 9q,

and let a1 , . . . , a18 , b1 , . . . , b18 P D be determined from the digits of t1 , . . . , t18 ,


respectively, via the relations
10aj ` bj tj

pj 1, . . . , 18q.

Since
S ` 2 t21, 31, 41, 51, 61u

S 2 t17, 27, 37, 47, 57u,

and

all of the digits a1 , . . . , a18 , b1 , . . . , b18 are nonzero, as required.


Using (2.2) we compute
18

q1,k paj , bj q

j1

18

102aj ` 103 bj ` 10k paj ` bj q

j1

103

18

tj ` 10k

j1

18

paj ` bj q

j1

2h 103 ` 10k

18

paj ` bj q

j1

since
t1 ` ` t18 2ps1 ` ` s9 q 2h
regardless of the choice of the j s. Taking (2.4) into account, we have
n

18

q1,k paj , bj q 10

pm 2hq `

j1

10 j 10

18

paj ` bj q,

(2.5)

j1

jk

and since 60 m 2h 80 it follows that the number defined by either side


of (2.5) lies in the set N1,k p5` ; cq, where c is the unique digit in D determined
by the congruence
18

k paj ` bj q c mod 10.


(2.6)
j1

To complete the proof, it suffices to show that for an appropriate choice of


the j s we have c 0, for this implies that n P N1,k`1p5` ; c2 q for some c2 P D.
To do this, let gprq denote the sum of the decimal digits of any r P N. Then
18

paj ` bj q

j1

18

j1

gptj q

gpsj ` j q `

j1

j1

For every number s P S, one readily verifies that


gps ` 2q ` gps 2q 2 gpsq 9.

gpsj j q.

EVERY NATURAL NUMBER IS THE SUM OF FORTY-NINE PALINDROMES

Therefore, (2.6) is equivalent to the congruence condition


k

18

gpsj q ` 9E c mod 10,

j1

where E is the number of integers j P t1, . . . , 9u such that j .. 2. As we can


clearly choose the j s so the latter congruence is satisfied with c 0, the proof
of the lemma is complete.


2.5. Proof of Theorem 1.1. Let n be an arbitrary natural number. To show that
n is the sum of 49 palindromes, we can assume that L : Lpnq is at least 25, as
mentioned in 2.2. By Lemma 2.3 we can find two palindromes pr1 , pr2 such that
the number
n1 .. n pr1 pr2
(2.7)

belongs to N,0 p5` ; c1 q for some P tL 1, Lu and c1 P D. Since 24, by


p1q
p1q p1q
p1q
Lemma 2.4 we can find digits a1 , . . . , a18 , b1 , . . . , b18 P Dzt0u and c2 P D such
that the number
18

` p1q p1q
.
.
n2 n1
q1,0 aj , bj
j1

lies in the set N1,1 p5 ; c2 q. Similarly, using Lemma 2.4 again we can find digits
p2q
p2q p2q
p2q
a1 , . . . , a18 , b1 , . . . , b18 P Dzt0u and c3 P D such that
n3 ..

n2

18

j1

` p2q p2q
q2,1 aj , bj

belongs to the set N2,2 p5` ; c3 q. Proceeding inductively in this manner, we


continue to construct the sequence n1 , n2 , n3 , . . ., where each number
ni ..

ni1

18

j1

` pi1q pi1q
qi`1,i2 aj , bj

(2.8)

lies in the set Ni`1,i1 p5` ; ci q. The method works until we reach a specific
value of i, say i .. , where ` 1 p 1q ` 6; at this point, Lemma 2.4
can no longer be applied.
Notice that, since ` 1 p 1q ` 5, every element of N`1,1 p5` ; c q
has at most five nonzero digits. Therefore, by Lemma 2.2 we can find eleven
palindromes pr3 , pr4 , . . . , pr13 such that
n pr3 ` pr4 ` ` pr13 .

Now, combining (2.7), (2.8) with i 2, 3, . . . , , and (2.9), we see that


n

13

i1

prj `

18

j1

Nj ,

(2.9)

W. D. BANKS

where
Nj ..

i2

` pi1q pi1q
qi`1,i2 aj , bj

pj 1, . . . , 18q.

To complete the proof of the theorem, it remains to verify that every integer Nj
is the sum of two palindromes. Indeed, by (2.2) we have
Nj

i2

` pi1q
` pi1q
pi`1,i2 aj
`
pi,i2 bj
.
i2

Considering the form of the decimal expansions, for each j we see that

i2

` pi1q
p1q

pi`1,i2 aj
aj

p1q

aj

p1q

0 0 aj

p1q

aj

p1q

which is a palindrome of length 1 (since aj 0) having precisely 2p 1q


nonzero entries, and

` pi1q
p1q
p1q
p1q
p1q
pi,i2 bj
bj
bj
0 0 bj
bj
i2

p1q

which is a palindrome of length 2 (since bj


2p 1q nonzero entries.

0), also having precisely

References
[1] J.-P. Allouche and J. Shallit, Sums of digits, overlaps, and palindromes, Discrete Math.
Theor. Comput. Sci. 4 (2000), no. 1, 110.
[2] W. D. Banks, D. N. Hart and M. Sakata, Almost all palindromes are composite, Math.
Res. Lett. 11 (2004), no. 5-6, 853868.
[3] W. D. Banks and I. E. Shparlinski, Average value of the Euler function on binary palindromes, Bull. Pol. Acad. Sci. Math. 54 (2006), no. 2, 95101.
[4] W. D. Banks, and I. E. Shparlinski, Prime divisors of palindromes, Period. Math. Hungar. 51 (2005), no. 1, 110.
[5] A. Berczes and V. Ziegler, On simultaneous palindromes, J. Comb. Number Theory 6
(2014), no. 1, 3749.
[6] J. Cilleruelo, F. Luca, and I. E. Shparlinski, Power values of palindromes, J. Comb.
Number Theory 1 (2009), no. 2, 101107.
[7] J. Cilleruelo, R. Tesoro and F. Luca, Palindromes in linear recurrence sequences,
Monatsh. Math. 171 (2013), no. 3-4, 433442.
[8] S. Col, Palindromes dans les progressions arithmetiques, Acta Arith. 137 (2009), no.
1, 141. (French)
[9] D. Coogan and H. Gabai, On palindromes and palindromic primes, Math. Mag. 42
(1969), 252254.
[10] E. Goins, Palindromes in different bases: A conjecture of J. Ernest Wilkins, Integers 9
(2009), A55, 725734.
[11] S. Hernandez Hernandez and F. Luca, Palindromic powers, Rev. Colombiana Mat. 40
(2006), no. 2, 8186.
[12] I. Korec, Palindromic squares for various number system bases, Math. Slovaca 41
(1991), no. 3, 261276.

EVERY NATURAL NUMBER IS THE SUM OF FORTY-NINE PALINDROMES

[13] F. Luca, Palindromes in Lucas sequences, Monatsh. Math. 138 (2003), no. 3, 209223.
[14] G. J. Simmons, On palindromic squares of non-palindromic numbers, J. Recreational
Math. 5 (1972), no. 1, 1119.
Department of Mathematics, University of Missouri, Columbia MO, USA.
E-mail address: bankswd@missouri.edu

You might also like