DeepAI

# Waring's Theorem for Binary Powers

A natural number is a binary k'th power if its binary representation consists of k consecutive identical blocks. We prove an analogue of Waring's theorem for sums of binary k'th powers. More precisely, we show that for each integer k ≥ 2, there exists a positive integer W(k) such that every sufficiently large multiple of E_k := (2^k - 1, k) is the sum of at most W(k) binary k'th powers. (The hypothesis of being a multiple of E_k cannot be omitted, since we show that the of the binary k'th powers is E_k.) Also, we explain how our results can be extended to arbitrary integer bases b > 2.

• 55 publications
• 2 publications
• 47 publications
12/17/2019

### New Bounds on Antipowers in Binary Words

Fici et al. defined a word to be a k-power if it is the concatenation of...
08/10/2019

### RISC-V: #AlphanumericShellcoding

We explain how to design RISC-V shellcodes capable of running arbitrary ...
03/10/2021

### Binary Signed-Digit Integers, the Stern Diatomic Sequence and Stern Polynomials

Stern's diatomic sequence is a well-studied and simply defined sequence ...
08/11/2022

### Automatic Sequences in Negative Bases and Proofs of Some Conjectures of Shevelev

We discuss the use of negative bases in automatic sequences. Recently th...
07/09/2019

### Block-avoiding point sequencings of arbitrary length in Steiner triple systems

An ℓ-good sequencing of an STS(v) is a permutation of the points of the ...
01/18/2018

### On partitions into squares of distinct integers whose reciprocals sum to 1

In 1963, Graham proved that all integers greater than 77 (but not 77 its...
01/08/2021

### The extended binary quadratic residue code of length 42 holds a 3-design

The codewords of weight 10 of the [42,21,10] extended binary quadratic r...

## 1 Introduction

Let be the natural numbers and let . The principal problem of additive number theory is to determine whether every integer (resp., every sufficiently large integer ) can be represented as the sum of some constant number of elements of , not necessarily distinct, where the constant does not depend on . For a superb introduction to this topic, see [10].

Probably the most famous theorem of additive number theory is Lagrange’s theorem from 1770: every natural number is the sum of four squares [6]. Waring’s problem (see, e.g., [16, 17]), first stated by Edward Waring in 1770, is to determine such that every natural number is the sum of ’th powers. (A priori, it is not even clear that , but this was proven by Hilbert in 1909.) From Lagrange’s theorem we know that . For other results concerning sums of squares, see, e.g., [4, 9].

If every natural number is the sum of elements of , we say that forms a basis of order . If every sufficiently large natural number is the sum of elements of , we say that forms an asymptotic basis of order .

In this paper, we consider a variation on Waring’s theorem, where the ordinary notion of integer power is replaced by a related notion inspired from formal language theory. Our main result is Theorem 4 below. We say that a natural number is a base- ’th power if its base- representation consists of consecutive identical blocks. For example, 3549 in base is

 110111011101,

so 3549 is a base-2 (or binary) cube. Throughout this paper, we consider only the canonical base- expansions (that is, those without leading zeros). The binary squares

 0,3,10,15,36,45,54,63,136,153,170,187,204,221,238,255,528,561,594,627,…

form sequence A020330 in Sloane’s On-Line Encyclopedia of Integer Sequences [15]. The binary cubes

 0,7,42,63,292,365,438,511,2184,2457,2730,3003,3276,3549,3822,4095,16912,…

form sequence A297405.

Notice that a number is a base- ’th power if and only if we can write , where

 cbk(n):=bkn−1bn−1=1+bn+⋯+b(k−1)n

for some such that . (The latter condition is needed to ensure that the base- ’th power is formed by the concatenation of blocks that begin with a nonzero digit.) Such a number consists of consecutive blocks of digits, each of length . For example, . We define

 Sbk:={n≥0 : n is a base-b k'th power}={a⋅cbk(n) : n≥1, bn−1≤a

The set is an interesting and natural set to study because its counting function is , just like the ordinary ’th powers. It has also appeared in a number of recent papers (e.g., [1]). However, there are two significant differences between the ordinary ’th powers and the base- ’th powers.

The first difference is that is not a base- ’th power for . Thus, the base- ’th powers cannot, in general, form a basis of finite order, but only an asymptotic basis.

A more significant difference is that the gcd of the ordinary ’th powers is always equal to , while the gcd of the base- ’th powers may, in some cases, be greater than one. This is quantified in Section 2. Thus, it is not reasonable to expect that every sufficiently large natural number can be the sum of a fixed number of base- ’th powers; only those that are also a multiple of the can be so represented.

## 2 The greatest common divisor of Sbk

###### Theorem 1.

For define

 Ak =gcd(Sbk), Bk =gcd(cbk(1),cbk(2),…), Ck =gcd(cbk(1),cbk(2),…,cbk(k)), Dk =gcd(cbk(1),cbk(k)), Ek =gcd(bk−1b−1,k).

Then .

###### Proof.

: If divides , then it clearly also divides all numbers of the form with and hence .

On the other hand if divides , then it divides . Furthermore, divides and (both of which are members of provided ). So it must divide their difference, which is just . So divides .

: Note that divides if and only if it divides and also for all . Now it is well known that, for and integers , we have

 bn≡bnmodk \rm(mod bk−1\rm).

Hence

 cbk(n) =1+bn+⋯+b(k−1)n≡1+bnmodk+⋯+b(k−1)nmodk \rm(mod bk−1\rm) ≡1+ba+⋯+b(k−1)a \rm(mod bk−1% \rm) ≡1+ba+⋯+b(k−1)a \rm(mod cbk(1)\rm) ≡cbk(a) \rm(mod cbk(1)\rm),

where . Thus any divisor of is also a divisor of . The converse is clear.

: It suffices to observe that

 cbk(k) =1+bk+⋯+b(k−1)k ≡k1+1+⋯+1 \rm(mod bk−1% \rm) ≡k \rm(mod bk−1\rm) ≡k \rm(mod bk−1b−1\rm) ≡k \rm(mod cbk(1)\rm).

: Every divisor of clearly divides , and above we saw . We now show that every prime divisor of divides to at least the same order, thus showing that every divisor of divides . We need the following classic lemma, sometimes called the “lifting-the-exponent” or LTE lemma [2]:

###### Lemma 2.

If is a prime number and is an integer such that , then

 νp(cn−1c−1)≥νp(n),

for all positive integers , where is the -adic valuation of (the exponent of the highest power of dividing ).

Fix an integer and let be a prime factor of . On the one hand, if , then by Lemma 2 we get that

 νp(cbk(ℓ))=νp(bkℓ−1bℓ−1)≥νp(k)≥νp(Ek),

since . Hence . On the other hand, if , then divides simply because divides the numerator but does not divide the denominator. In both cases, we have that , and since this is true for all prime divisors of , we get that , as desired. ∎

###### Remark 3.

For , the sequence is sequence A014491 in Sloane’s Encyclopedia. We make some additional remarks about the values of in Section 5.

In the remainder of the paper, for concreteness, we focus on the case . We set and . However, everything we say also applies more generally to bases , with one minor complication that is mentioned in Section 5.

## 3 Waring’s theorem for binary k’th powers: proof outline and tools

We now state the main result of this paper.

###### Theorem 4.

Let be an integer. Then there is a number such that every sufficiently large multiple of is representable as the sum of at most binary ’th powers.

###### Remark 5.

The fact that was proved in [8].

###### Proof sketch.

Here is an outline of the proof. All of the mentioned constants depend only on .

Given a number , a multiple of , that we wish to represent as a sum of binary ’th powers, we first choose a suitable power of , say , and think of as a degree- polynomial evaluated at . For example, we can represent in base ; the “digits” of this representation then correspond to the coefficients of .

Similarly, the integers can also be viewed as polynomials in . By linear algebra, there is a unique way to rewrite as a linear combination of

, and this linear transformation can be represented by a matrix

that depends only on , and is independent of .

At first glance, such a linear combination would seem to provide a suitable representation of in terms of binary ’th powers, but there are three problems to overcome:

1. the coefficients of , , could be much too large;

2. the coefficients could be too small or negative;

3. the coefficients might not be integers.

Issue (a) can be handled by choosing such that . This guarantees that the resulting coefficients of the are at most a constant factor larger than . Using Lemma 7 below, the coefficients can be “split” into at most a constant number of coefficients lying in the desired range.

Issue (b) is handled by not working with , but rather with , where is a suitably chosen linear combination of with large positive integer coefficients. Any negative coefficients arising in the expression for can now be offset by adding the large positive coefficients corresponding to , giving us coefficients for the representation of that are positive and lie in a suitable range.

Issue (c) is handled by rounding down the coefficients of the linear combination to the next lower integer. This gives us a representation, as a sum of binary ’th powers, for some smaller number , where the difference is a sum of at most terms of the form , where is the determinant of . However, the base- representation of is, disregarding leading zeros, actually periodic with some period . By choosing an appropriate small multiple of a binary ’th power corresponding to copies of this period, we can approximate each , and hence , from below by some number that is a sum of binary ’th powers.

The remaining error term is , which turns out to be at most some constant depending on . Since is a multiple of and and are sums of binary ’th powers, it follows that is also a multiple of . With care we can ensure that is larger than the Frobenius number of the binary ’th powers, and hence can be written as a sum of elements of . On the other hand, since is a constant, at most a constant number of additional binary ’th powers are needed to represent it. This completes the sketch of our construction. It is carried out in more detail in the rest of the paper. ∎

###### Remark 6.

In what follows, we spend a small amount of time explaining that certain quantities are actually constants that depend only on

. By estimating these constants we could come up with an explicit bound on

, but we have not done so.

### 3.1 Expressing multiples of ck(n) as a sum of binary k’th powers

As we have seen, a number of the form with is a binary ’th power. But how about larger multiples of ? The following lemma will be useful.

###### Lemma 7.

Let . Then is the sum of at most binary ’th powers.

###### Proof.

Clearly the claim is true for . Otherwise, define and , so that . Then , where and . A routine calculation now shows that , and so is the sum of binary ’th powers. ∎

### 3.2 Change of basis and the Vandermonde matrix

In what follows, matrices and vectors are always indexed starting at

. Recall that a Vandermonde matrix

 V(a0,a1,…,ak−1)

is a matrix where the entry in the ’th row and ’th column, for , is defined to be . The matrix is invertible if and only if the are distinct.

Recall that . For and we have

 ⎡⎢ ⎢ ⎢ ⎢ ⎢⎣ck(n)ck(n+1)⋮ck(n+k−1)⎤⎥ ⎥ ⎥ ⎥ ⎥⎦=Mk⎡⎢ ⎢ ⎢ ⎢ ⎢⎣12n⋮2(k−1)n⎤⎥ ⎥ ⎥ ⎥ ⎥⎦, (1)

where . For example,

 M4=⎡⎢ ⎢ ⎢⎣111112481416641864512⎤⎥ ⎥ ⎥⎦.

Let a natural number be represented as an -linear combination

 Y=a0+a12n+⋯+ak−12(k−1)n.

Then, multiplying Eq. (1) on the left by

 [b0b1⋯bk−1]:=[a0a1⋯ak−1]M−1k,

we get the following expression for as a -linear combination of binary ’th powers:

 Y=b0ck(n)+b1ck(n+1)+⋯+bk−1ck(n+k−1).

It remains to estimate the size of the coefficients , as well as the sizes of their denominators.

The Vandermonde matrix is well studied (e.g., [12, pp. 43, 105]). We recall one basic fact about it.

###### Lemma 8.

The determinant of is

 ∏0≤i

We now define to be the determinant of , and to be the largest of the absolute values of the entries of . Note that, by Lemma 8, is positive. Also, Laplace’s formula tells us that , where is the adjugate (classical adjoint) of . Furthermore, since has integer entries, so does .

We have for .

###### Proof.

By the formula of Lemma 8 we know that

 dk=∏0≤i

for . ∎

Our next result demonstrates that , the absolute value of the largest entry in , is bounded above by a constant.

We have .

###### Proof.

As is well known (see, e.g., [5, Exercise 1.2.3.40], the ’th column in the inverse of the Vandermonde matrix consists of the coefficients of the polynomial

 p(x):=∏0≤j

We also observe that if

 (x−b1)(x−b2)⋯(x−bn)=xn+cn−1xn−1+⋯+c1x+c0,

is a polynomial with real roots, then the absolute value of every coefficient is bounded by

 |c0|+⋯+|cn−1|≤∏1≤i≤n(1+|bi|).

Putting these two facts together, we see that all of the entries in the ’th column of are, in absolute value, bounded by

 Pk(i):=∏0≤j

Now let’s specialize to . We get

 Pk(i):=∏0≤j

To finish the proof of the upper bound, it remains to find a lower bound for the denominator

 Qk(i):=∏0≤j

We claim, for , that

 Qk(0)≥Qk(1) (2)

and

 Qk(1)≤Qk(2)≤⋯≤Qk(k−1). (3)

To see (2), note that and . On the other hand, by telescoping cancellation we see, for , that

 Qk(i)Qk(i+1)=2k−1−2i(2i+1−1)2k−2<2k−13⋅2k−2=23,

which proves (3). Hence is minimized at . Now

 ℓk ≤∏0≤j

###### Remark 11.

The tightest upper bound seems to be for all , but we did not prove this.

### 3.3 Expressing fractions of powers of 2 as sums of binary k’th powers

In everything that follows, is an integer greater than .

###### Lemma 12.

Let

be an odd integer. Define

, so that . Let be the order of in the multiplicative group of integers modulo . Then for all integers , the number

 ⌊2jm+ef⌋

is a binary ’th power, whose base- representation consists of repetitions of a block of size .

###### Proof.

Since is the multiplicative order of modulo , we have for some positive integer . Then

 1f=q2m−1=q∑i≥12−im.

Multiplying by and splitting the summation into two pieces, we see that

 2jm+ef =q⋅2jm+e∑i≥12−im =q⋅2jm+e∑1≤i≤j2−im+q⋅2jm+e∑i>j2−im =q⋅2e⋅2jm−12m−1+2ef. (4)

Since , the right-hand side of Eq. (3.3) is the sum of an integer and a number strictly between and . It follows that

 ⌊2jm+ef⌋=q⋅2e⋅2jm−12m−1.

It remains to see that is in the right range: we must have .

To see this, note that

 q⋅2e=2m−1f⋅2e=2m+ef−2ef,

and, since , it follows that

 2m+ef−1

Rewriting gives

 2m−1−1<2m−1(2e+1f)−1

or , as desired. ∎

###### Lemma 13.

Let be an integer with , where is odd. Then for all , the number can be written as the sum of at most binary ’th powers and an integer with .

###### Proof.

There are two cases: (a) or (b) .

(a) : Using the division algorithm write for . Since we have

 ⌊2ng⌋=2ng=2n−ℓ=2rk+i=2i(2rk−1)+2i.

The base- representation of is clearly a binary ’th power. Take .

(b) : Let and let be the order of in the multiplicative group of integers modulo .

Using the division algorithm, write for some with . Note that since we have .

Then

 2ng =2rkm+i+ℓ+e2ℓ⋅f=2rkm+i+ef =2i⋅2rkm+ef=2i⌊2rkm+ef⌋+t,

with . Now take the floor of both sides and apply Lemma 12. ∎

### 3.4 The Frobenius number

Let be a set and be a real number. By we mean the set .

Let with . The Frobenius number of , written , is the largest integer that cannot be represented as a non-negative integer linear combination of elements of . See, for example, [13].

As we have seen, . Thus . Define to be the Frobenius number of the set . In this section we give a weak upper bound for .

For we have .

###### Proof.

Consider where , , and . We have . Let be the greatest common divisor of . Then divides and . So divides . On the other hand, clearly, divides , while from Theorem 1 we know that . Hence, .

Clearly . Furthermore, since , it follows that . By a well-known result (see, e.g., [13, Theorem 2.1.1, p. 31]), we have , and the desired claim follows. ∎

###### Remark 15.

We compute explicitly that , , , , and .

## 4 The complete proof

We are now ready to fill in the details of the proof of our main result, Theorem 4. We recall the definitions of the following quantities that will figure in the proof:

• ;

• is the greatest common divisor of the set of binary ’th powers;

• is the Frobenius number of the set ;

• is the determinant of the Vandermonde matrix ;

• is the largest of the absolute values of the entries of

We will show that, for , there exists a constant such that every integer that is a multiple of can be written as the sum of binary ’th powers.

###### Proof.

The result is clear for , so let us assume and that is a multiple of . Define . In the proof there are several places where we need to be “sufficiently large”; that is, greater than some constant depending only on ; some are awkward to write explicitly, so we do not attempt to do so. Instead we just assume satisfies the requirement . The cases are then handled by writing as a sum of a constant number of elements of .

Let . Let be a constant specified below, and let be the largest integer such that ; we assume is sufficiently large so that .

First we explain how to write , where

1. ; and

2. is an -linear combination of with all coefficients sufficiently large.

To do so, define , and . We have now obtained (a good approximation of ), which is an -linear combination of with every coefficient equal to . Note that .

We now improve this approximation of using a greedy algorithm, as follows: from we remove as many copies as possible of , then as many copies as possible of , and so forth, down to . More precisely, for each index (in that order) set

 ri=⌊X−RQ−∑i

and then put

 D:=RQ+r0ck(n)+r1ck(n+1)+⋯+rk−1ck(n+k−1).

By the way we chose the , we have and for . Furthermore, . Define for . Then .

Since , we can express in base as , where each is an integer satisfying .

Apply the transformation discussed above in Section 3.2, obtaining the -linear combination

 Y=∑0≤i

It follows that .

Furthermore, from Section 3.2 we know that each is at most in absolute value, and the denominator of each is at most .

Now we want to ensure that, for , it holds

 2n+i−1≤ei+bi

where is a constant depending only on . We choose the constant mentioned above to get the bound (5).

Pick such that . Then we have

 ei+bi ≥R−kℓk⋅2n>XQ−kℓk⋅2n−1>2knc−k2⋅2(k−1)(n+k)+1−kℓk⋅2n−1 =2n(c−k2−k2+k−1−kℓk−2−n)>2n+k−2≥2n+i−1,

as desired.

For the upper bound, recalling that our choice of implies that , we have

 ei+bi

and a routine calculation shows that , where the depends only on .

The only problem left to resolve is that the need not be integers. Write , where

 X1:=∑0≤i

Thanks to (5), we can use Lemma 7 to rewrite as a sum of a constant number of binary ’th powers. Then

 X2=∑0≤i

where is a rational number with denominator . Writing , we see

 X2 =∑0≤i

where .

By Lemma 13 we know that, provided , each term is the sum of a constant number of binary ’th powers, plus an error term that is at most . Thus, provided (and hence ) are large enough, this will be true for all exponents except those corresponding to . Those exponents are not a problem, since for we have