A variation on the theme of Nicomachus

We prove some conjectures of K. Stolarsky concerning the first and third moment of the Beatty sequences with the golden section and its square.

In the notation Here, ⌊x⌋ is the integer part of the real number x. The limit in (2) follows from ⌊αn⌋ = αn + O(1) and Nicomachus's theorem (1). Recall that the Fibonacci and Lucas sequences {F n } n≥0 and {L n } n≥0 are given by F 0 = 0, F 1 = 1 and L 0 = 2, L 1 = 1 and the recurrence relations F n+2 = F n+1 + F n , L n+2 = L n+1 + L n for n ≥ 0. In an unpublished note, which was recorded by the second author, Stolarsky observed that the limit relation (2) can be 'quantified' for α = φ and φ 2 , where φ := (1 + √ 5)/2 is the golden mean, and a specific choice of m along the Fibonacci sequence. The corresponding result is Theorem 1 below. We complement it by a general analysis of moments of the Beatty sequences and give a solution to a related arithmetic question in Theorem 5.

Principal results
Theorem 1. For k ≥ 1 an integer, define m k := F k − 1. We have The theorem motivates our interest in the numerators and denominators of Q(φ, F k − 1) and Q(φ 2 , F k − 1), which can be thought as expressions of the form Namely, we find a recurrence relation for A(k, j, s) and deduce the recursions for A(k, s) = A(k, s, 0) and A ′ (k, s) from it. The strategy leads to the following expressions for the desired numerators and denominators in Theorem 1, which are given in Lemmas 2-4.
Lemma 3. Let k ≥ 1 be an integer. Then and Lemma 4. Let k ≥ 1 be an integer. Then and Finally, we present an arithmetic formula inspired by Stolarsky's original question.
Remark 6. Lemmas 2-4 indicate that the expression is expressible as a fraction whose numerator and denominator are polynomials in Fibonacci and Lucas numbers with indices depending linearly on k according to the parity of k, yet the statement of Theorem 1 presents formulas for these quantities according to the congruence class of k modulo 4 rather than modulo 2. The discrepancy is related to different factorizations of the factors that occur in the formulas for A(k, j) and A ′ (k, j) for j ∈ {1, 3}, as each of such factors F n − 1 is a product of a Fibonacci and Lucas number according to the congruence class of n modulo 4 (see formulas (6)).

Recurrence relations for auxiliary sums
Here, we show how to compute the integer-part sums (3). This clearly covers the cases A(k, s) = A(k, s, 0). On using which upon multiplication with the integer n and taking integer parts becomes one also gets the explicit formulas Using the Binet formula one proves easily that and that [1]). Thus, The above reduction, the identity A(k, 0, 0) = F k − 1, and the induction on k + j + s implies that in particular, for a fixed choice of s, j the sequence {A(k, s, j)} k≥1 is linearly recurrent of order at most 4(s+j)+6. Here we used this observation together with the following facts: • If u = {u n } n≥0 is a linearly recurrent sequence whose roots are all simple in some set U then, for fixed integers p and q, the sequence {u pn+q } n≥0 is linearly recurrent with simple roots in {α p : α ∈ U }. • If u = {u n } n≥0 and v = {v n } n≥0 are linearly recurrent whose roots are all simple in some sets U and V , respectively, then uv = {u n v n } n≥0 is linearly recurrent whose roots are all simple in U V = {αβ : α ∈ U, β ∈ V }. In this context, the roots of a linearly recurrent sequence are defined as the zeroes of its characteristic polynomial, counted with their multiplicities.
It then follows that, for a fixed s, each of the sequences {A ′ (k, s)} k≥1 and {A ′ (k, s)} k≥1 are linearly recurrent of order at most 4s + 6.

The proofs of the lemmas
We first establish Lemma 2. By the argument in Section 3, both A(k, 1) and A ′ (k, 1) are linearly recurrent with simple roots in the set {±φ l : |l| ≤ 2}.
The same is true for the right-hand sides in (4). Since the set of roots is contained in a set with 10 elements, it follows that the validity of (4) for k = 1, . . . , 10 implies that the relations hold for all k ≥ 1. A few words about the computation. For the identities presented in Lemmas 2-4, one can just use brute force to compute A(k, s) and A ′ (k, s) for s = 1, 3 and k = 2ℓ + i, where i ∈ {0, 1} and ℓ = 1, . . . , 9, with any computer algebra system. This takes a few minutes. If one would need to check it up to larger values of k, say around 100, the brute force strategy no longer works since the summation range up to F k − 1 becomes too large. Instead one can use the recursion from Section 3 together with A(k, 0, 0) = F k − 1 to find subsequently A(k, 1, 0), A(k, 2, 0) and A(k, 3, 0) for all desired k and, similarly, A(k, s, j) for small j to evaluate A ′ (k, s).

The proof of Theorem 1
Let us now address Theorem 1. When k = 4ℓ, this can be rewritten as Since A(4ℓ, s) and A ′ (4ℓ, s) are linearly recurrent (in ℓ) with roots contained in {φ 4l : |l| ≤ s + 1}, and both the left-most factor in the left-hand side and the right-most factor in the right-hand side have each simple roots in {φ 4l : |l| ≤ 2}, it follows that the both the left-hand side and the right-hand side are linearly recurrent with simple roots contained in {φ 4l : |l| ≤ 10}, a set with 21 elements. Thus, if the above formula holds for ℓ = 1, . . . , 21, then it holds for all ℓ ≥ 1. A similar argument applies to the case when k = 4ℓ + i for i ∈ {1, 2, 3}. Hence, all claimed formulas hold provided they hold for all k ≤ 100, say. Now we use the lemmas. For k = 4ℓ, Lemmas 2, 3 and 4 tell us that (5), after reducing the common factor (F 4ℓ − 1) 2 (F 4ℓ+1 − 1) 2 (F 4ℓ+2 − 1)/16, is equivalent to (and one can perform further reduction using (6)). It is sufficient to verify the resulting equality for ℓ = 1, . . . , 15 and we have checked it for all ℓ = 1, . . . , 100. The remaining cases for k modulo 4 are similar. We do not give further details here.
6. The proof of Theorem 5 This follows from Lemma 2, the classical formulas as well as known facts about the greatest common divisor of Fibonacci and Lucas numbers with close arguments. For example, for k = 2ℓ, we have where we used the fact that gcd(L 2ℓ+1 , L 2ℓ+2 ) = 1. The case k = 2ℓ + 1 is similar.

Further variations
First, we give an informal account of a more general result lurking, perhaps, behind the formulas in Theorem 1. Consider a homogeneous (rational) function r(x) = r(x 1 , . . . , x m ) of degree 1, that is, satisfying r(tx) = tr(x) for t ∈ Q, and an algebraic number α solving the equation Some further variations on the topic can be investigated in the q-direction, based on q-analogues of Nicomachus's theorem (1) (consult with [3]).