ISSN 1855-3966 (printed edn.), ISSN 1855-3974 (electronic edn.) ARS MATHEMATICA CONTEMPORANEA 20 (2021) 1–27 https://doi.org/10.26493/1855-3974.2374.9ff (Also available at http://amc-journal.eu) New results on modular Golomb rulers, optical orthogonal codes and related structures* Marco Buratti † Dipartimento di Matematica e Informatica, Università di Perugia, 06123, Perugia, Italy Douglas Robert Stinson ‡ David R. Cheriton School of Computer Science, University of Waterloo, Waterloo, Ontario, N2L 3G1, Canada Received 4 July 2020, accepted 12 October 2020, published online 26 November 2020 Abstract We prove new existence and nonexistence results for modular Golomb rulers in this paper. We completely determine which modular Golomb rulers of order k exist, for all k ≤ 11, and we present a general existence result that holds for all k ≥ 3. We also derive new nonexistence results for infinite classes of modular Golomb rulers and related structures such as difference packings, optical orthogonal codes, cyclic Steiner systems and relative difference families. Keywords: Golomb ruler, optical orthogonal code, difference family. Math. Subj. Class. (2020): 05B10 1 Introduction and definitions A Golomb ruler of order k is a set of k distinct integers, say x1 < x2 < · · · < xk, such that all the differences xj−xi (i ̸= j) are distinct. To avoid trivial cases, we assume k ≥ 3. The length of the ruler is xk−x1. For a survey of constructions of Golomb rulers, see [12]. A (v, k)-modular Golomb ruler (or (v, k)-MGR) is a set of k distinct integers, 0 ≤ x1 < x2 < · · · < xk ≤ v − 1, *We would like to thank Dieter Jungnickel and Hugh Williams for helpful comments and pointers to the literature. We also thank Shannon Veitch for assistance with programming. Finally, we thank a referee for pointing out a mistake in Corollary 3.4. †This work has been performed under the auspices of the G.N.S.A.G.A. of the C.N.R. (National Research Council) of Italy. ‡D. R. Stinson’s research is supported by NSERC discovery grant RGPIN-03882. E-mail addresses: buratti@dmi.unipg.it (Marco Buratti), dstinson@uwaterloo.ca (Douglas Robert Stinson) cb This work is licensed under https://creativecommons.org/licenses/by/4.0/ 2 Ars Math. Contemp. 20 (2021) 1–27 such that all the differences xj − xi mod v (i ̸= j) are distinct elements of Zv . We define length and order as before. It is obvious that a modular Golomb ruler is automatically a Golomb ruler. We can assume without loss of generality that x1 = 0. Known results on modular Golomb rulers are summarized in [9, §VI.19.3]. We state a few basic results and standard constructions now. Theorem 1.1. If there exists a (v, k)-MGR, then v ≥ k2−k+1. Further, a (k2−k+1, k)- MGR is equivalent to a cyclic (k2 − k + 1, k, 1)-difference set. Of course a (q2 + q + 1, q + 1, 1)-difference set (i.e., a Singer difference set) is known to exist if q is a prime power. So we have the following Corollary. Corollary 1.2. There exists a (k2 − k + 1, k, 1)-MGR if k − 1 is a prime power. It is widely conjectured that a (q2 + q + 1, q + 1, 1)-difference set exists only if q is a prime power, and this conjecture has been verified for all q < 2, 000, 000; see [14]. Theorem 1.3 (Bose [3]). For any prime power q, there is a (q2 − 1, q)-MGR. Theorem 1.4 (Rusza [21]). For any prime p, there is a (p2 − p, p− 1)-MGR. A (v, k;n)-difference packing is a set of n k-element subsets of Zv , say X1, . . . , Xn, such that all the differences in the multiset {x− y : x, y ∈ Xi, x ̸= y, 1 ≤ i ≤ n} are nonzero and distinct. The following result is obvious. Theorem 1.5. A (v, k)-MGR is equivalent to a (v, k; 1)-difference packing. A (v, b, r, k)-configuration is a set system (V,B), where V is a set of v points and B is a set of b blocks, each of which contains exactly k points, such that the following properties hold: 1. no pair of points occurs in more than one block, and 2. every point occurs in exactly r blocks. It is easy to see that the parameters of a (v, b, r, k)-configuration satisfy the equation bk = vr. For basic results on configurations, see [9, §VI.7]. A (v, b, r, k)-configuration is symmetric if v = b, which of course implies r = k. In this case we speak of it as a sym- metric (v, k)-configuration. A symmetric (v, k)-configuration is cyclic if there is a cyclic permutation of the v points that maps every block to a block. We state the following easy result without proof. Theorem 1.6. A (v, k)-MGR is equivalent to a cyclic symmetric (v, k)-configuration. For additional connections between Golomb rulers and symmetric configurations, see [7, 10]. A (v, k, λa, λc)-optical orthogonal code of size n is a set C of n (0, 1)-vectors of length v, which satisfies the following properties: 1. the Hamming weight of x is equal to k, for all x ∈ C, M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 3 2. autocorrelation: for all x = (x0, . . . , xv−1) ∈ C, the following holds for all integers τ such that 0 < τ < v: v−1∑ i=0 xixi+τ ≤ λa, where subscripts are reduced modulo v. 3. cross-correlation: for all x = (x0, . . . , xv−1) ∈ C and all y = (y0, . . . , yv−1) ∈ C with x ̸= y, the following holds for all integers τ such that 0 ≤ τ < v: v−1∑ i=0 xiyi+τ ≤ λc, where subscripts are reduced modulo v. We sometimes abbreviate the phrase “optical orthogonal code” to “OOC.” If λa = λc = λ, then the optical orthogonal code is denoted as a (v, k, λ)-optical orthogonal code. Optical orthogonal codes were introduced by Chung, Salehi and Wei [8] in 1989 and have been studied by numerous authors since then. The following result establishes the equivalence of OOC and difference packings. Theorem 1.7 ([8]). A (v, k;n)-difference packing is equivalent to a (v, k, 1)-optical or- thogonal code of size n. The following result is proven in [8] by a simple counting argument. Theorem 1.8. If there exists a (v, k, 1)-optical orthogonal code of size n, then n ≤ ⌊ v − 1 k(k − 1) ⌋ . A (v, k, 1)-optical orthogonal code is optimal if the relevant inequality in Theorem 1.8 is met with equality. Relative difference families have been introduced in [5] as a natural generalization of relative difference sets. We define them now. Let H be a subgroup of a finite additive group G, and let k, λ be positive integers. A (G,H, k, λ)-relative difference family, or (G,H, k, λ)-RDF for short, is a collection X of k-subsets of G (called base blocks) whose list of differences has no element in H and covers all elements of G \H exactly λ times. If G has order v and H has order w, we say that X is a (v, w, k, λ)-RDF in G relative to H . If X consists of n base blocks, it is evident that λ(v − w) = k(k − 1)n. (1.1) When H = {0} (or, equivalently, if w = 1), one usually speaks of an ordinary (v, k, λ)- difference family or (v, k, λ)-difference family ((v, k, λ)-DF, for short), in G. If n = 1, then we refer to a (G,H, k, λ)-relative difference family as a (G,H, k, λ)-relative differ- ence set. Analogously, a (v, k, λ)-difference family of size n = 1 is a (v, k, λ)-difference set ((v, k, λ)-DS, for short). 4 Ars Math. Contemp. 20 (2021) 1–27 1.1 Number-theoretic background In this section, we record some number-theoretic results that we will be using later in the paper. Theorem 1.9. 1. A positive integer can be written as a sum of two squares if and only if its prime decomposition contains no prime p ≡ 3 (mod 4) raised to an odd power. 2. A positive integer can be written as a sum of three squares if and only if it is not of the form 4a(8b+ 7), where a and b are nonnegative integers. 3. Any positive integer can be written as a sum of four squares. Proof. Statement 1. is proven in many textbook on elementary number theory, e.g., [20, Theorem 13.6]. The result 2. is known as Legendre’s Three-square Theorem (for a proof of it, see, e.g., [18, Chapter 20, Theorem 1]). Finally, 3. is Lagrange’s Four-square Theorem. Lemma 1.10. For any positive integer t, there exist t consecutive positive integers, none of which is a sum of two squares. Proof. Take t distinct primes p1, . . . , pt all of which are ≡ 3 (mod 4) (they exist by the Dirichlet’s Theorem on primes in an arithmetic progression). By the Chinese Remainder Theorem, the system of t congruences x+ i ≡ pi (mod p2i ) (1 ≤ i ≤ t) has a solution s. Since s+ i ≡ pi (mod p2i ), it is clear that s+ i is divisible by pi, but not by p2i . Since pi ≡ 3 (mod 4), it follows from Theorem 1.9 that s+ i is not a sum of two squares. This holds for 1 ≤ i ≤ t. Lemma 1.11. Two consecutive integers, say n and n+1, are both not expressible as a sum of three squares if and only if n = 4a(8b+ 7)− 1, where a ≥ 2 and b ≥ 0. Proof. This is a consequence of Legendre’s Three-square Theorem (Theorem 1.9). If n is not expressible as a sum of three squares, then n ≡ 0, 4 or 7 (mod 8). Therefore, if n and n + 1 are both not expressible as a sum of three squares, then n ≡ 7 (mod 8). It follows from Legendre’s Three-square Theorem that n and n+1 are both not expressible as a sum of three squares if and only if n+ 1 = 4a(8b+ 7) where a ≥ 2 and b ≥ 0. 1.2 Our contributions Section 2 gives existence results for modular Golomb rulers. We summarize exhaustive searches that we have carried out for all k ≤ 11, and we present a general existence result that holds for all k ≥ 3. Section 3 proves nonexistence results for various infinite classes of modular Golomb rulers. Many of our new results are based on counting even and odd differences and then applying some classical results from number theory which establish which integers can be expressed as a sum of a two or three squares. Section 4 studies opti- cal orthogonal codes and provides nonexistence results for certain optimal OOCs. In Sec- tion 5, we consider cyclic Steiner systems and relative difference families and we present additional nonexistence results using the techniques we have developed. Finally, Section 6 is a brief summary. M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 5 2 Existence results for (v, k)-MGR In this section, we report the results of exhaustive searches for (v, k)-MGR with k ≤ 11. We also prove a general existence result that holds for all integers k ≥ 3. First, we discuss a few preliminary results.. Given a positive integer k ≥ 3, define MGR(k) = {v : there exists a (v, k)-MGR}. We are interested in the set MGR(k). In particular, it is natural to try to determine the minimum integer in MGR(k) as well as the maximum integer not in MGR(k). Another parameter of interest is the length of a Golomb ruler. There has been consider- able research done on finding the minimum length of a Golomb ruler of specified order k, which we denote by L∗(k). In the modular case, we will define L∗m(k) to be the minimum L such that there exists a (v, k)-MGR of length L for some v. The following basic lemma is well-known. Lemma 2.1. Suppose there is a Golomb ruler of order k and length L, and suppose v ≥ 2L+ 1. Then there is a (v, k)-MGR. Proof. We have a Golomb ruler consisting of k integers 0 = x1 < x2 < · · · < xk = L. Consider these as residues modulo v, where v ≥ 2L+1. Clearly all the “positive residues” xj − xi mod v (i < j) are nonzero and distinct, as are all the “negative residues” xj − xi mod v (j < i). The largest positive residue is L and the smallest negative residue is v − L. Since v > 2L, no positive residue is equal to a negative residue. The following is an immediate consequence of Lemma 2.1. Lemma 2.2. For any positive integer k ≥ 2, L∗(k) = L∗m(k). Given a positive integer k ≥ 3, define MGR(k) = {v : there exists a (v, k)-MGR}. We have performed exhaustive backtracking searches in order to determine the sets MGR(k) for 3 ≤ k ≤ 11. For each value of k, once we have constructed a sufficient number of “small” (v, k)-MGR, we can apply Lemma 2.1 to conclude that all (v, k)-MGR exist for larger values of v. To this end, when we compute all the (v, k)-MGR for given values of v and k, we keep track of the ruler having the smallest possible length. This facilitates the application of Lemma 2.1 Our computational results are summarized as follows. Theorem 2.3. 1. MGR(3) = {v : v ≥ 7}. 2. MGR(4) = {v : v ≥ 13}. 3. MGR(5) = {21} ∪ {v : v ≥ 23}. 4. MGR(6) = {31} ∪ {v : v ≥ 35}. 6 Ars Math. Contemp. 20 (2021) 1–27 5. MGR(7) = {v : v ≥ 48}. 6. MGR(8) = {57} ∪ {v : v ≥ 63}. 7. MGR(9) = {73, 80} ∪ {v : v ≥ 85}. 8. MGR(10) = {91} ∪ {v : v ≥ 107}. 9. MGR(11) = {120, 133} ∪ {v : v ≥ 135}. Proof. Proof details are in Table 1. Table 1: (v, k)-modular Golomb rulers for 3 ≤ k ≤ 11. v k ruler v = 7 3 0, 1, 3 v ≥ 8 3 Lemma 2.1, v = 7, L = 3 v = 13 4 0, 1, 4, 6 v ≥ 14 4 Lemma 2.1, v = 13, L = 6 v = 21 5 0, 2, 7, 8, 11 v = 22 5 does not exist v ≥ 23 5 Lemma 2.1, v = 21, L = 11 v = 31 6 0, 1, 4, 10, 12, 17 32 ≤ v ≤ 34 6 does not exist v ≥ 35 6 Lemma 2.1, v = 31, L = 17 43 ≤ v ≤ 47 7 does not exist v = 48 7 0, 5, 7, 18, 19, 22, 28 v = 49 7 0, 2, 3, 10, 16, 21, 25 v = 50 7 0, 1, 5, 7, 15, 18, 27 v ≥ 51 7 Lemma 2.1, v = 49, L = 25 v = 57, 64, 68 8 0, 4, 5, 17, 19, 25, 28, 35 58 ≤ v ≤ 62 8 does not exist v = 63, 67 8 0, 1, 8, 20, 22, 25, 31, 35 v = 65 8 0, 2, 10, 11, 16, 28, 31, 35 v = 66 8 0, 2, 10, 21, 24, 25, 30, 37 v = 69 8 0, 1, 4, 9, 15, 22, 32, 34 v ≥ 70 8 Lemma 2.1, v = 69, L = 34 v = 73 9 0, 2, 10, 24, 25, 29, 36, 42, 45 74 ≤ v ≤ 79 9 does not exist v = 80 9 0, 1, 12, 16, 18, 25, 39, 44, 47 81 ≤ v ≤ 84 9 does not exist v = 85 9 0, 1, 7, 12, 21, 29, 31, 44, 47 v = 86, 88 9 0, 2, 5, 13, 17, 31, 37, 38, 47 v = 87 9 0, 1, 4, 13, 24, 30, 38, 40, 45 v = 89 9 0, 1, 5, 12, 25, 27, 35, 41, 44 v ≥ 90 9 Lemma 2.1, v = 89, L = 44 v = 91 10 0, 1, 6, 10, 23, 26, 34, 41, 53, 55 92 ≤ v ≤ 106 10 does not exist v = 107 10 0, 2, 15, 21, 22, 32, 46, 50, 55, 58 M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 7 Table 1: (v, k)-modular Golomb rulers for 3 ≤ k ≤ 11 (cont.) v k ruler v = 108 10 0, 2, 8, 27, 32, 36, 39, 49, 50, 65 v = 109 10 0, 4, 11, 16, 25, 35, 38, 53, 55, 61 v = 110 10 0, 3, 14, 16, 36, 37, 42, 46, 54, 61 v ≥ 111 10 Lemma 2.1, v = 91, L = 55 111 ≤ v ≤ 119 11 does not exist v = 120 11 0, 1, 4, 9, 23, 30, 41, 43, 58, 68, 74 121 ≤ v ≤ 132 11 does not exist v = 133 11 0, 1, 9, 19, 24, 31, 52, 56, 58, 69, 72 v = 134 11 does not exist v = 135 11 0, 5, 7, 11, 31, 41, 49, 50, 63, 66, 78 v = 136 11 0, 2, 11, 27, 37, 42, 45, 59, 65, 66, 78 v = 137 11 0, 1, 16, 21, 24, 33, 43, 61, 68, 72, 74 v = 138 11 0, 4, 5, 23, 25, 37, 52, 59, 65, 68, 76 v = 139 11 0, 1, 3, 11, 25, 41, 45, 54, 60, 72, 77 v = 140 11 0, 4, 10, 24, 25, 27, 36, 43, 65, 73, 78 v = 141 11 0, 2, 3, 7, 20, 29, 41, 52, 60, 66, 76 v = 142 11 0, 1, 13, 16, 22, 33, 47, 51, 70, 75, 77 v = 143, 144 11 0, 3, 7, 22, 27, 43, 56, 57, 66, 68, 74 v ≥ 145 11 Lemma 2.1, v = 133, L = 72 Remark 2.4. Existence of a (110, 10)-MGR also follows from Theorem 1.4, and existence of a (48, 7)-MGR and a (120, 11)-MGR follow from Theorem 1.3. The rulers that are presented in Table 1 provide upper bounds on L∗m(k) for 3 ≤ k ≤ 11. However, it turns out that all these values are in fact exact. This is because the exact values of L∗(k) are known for small k (see, for example, [11, Table 2.2]) and they match the minimum lengths of the modular Golomb rulers that we have recorded in Table 1. Thus we have the following result. Theorem 2.5. L∗m(3) = 3; L∗m(4) = 6; L∗m(5) = 11; L∗m(6) = 17; L∗m(7) = 25; L∗m(8) = 34; L ∗ m(9) = 44; L ∗ m(10) = 55; and L ∗ m(11) = 72. Now we state and prove two general existence results that hold for all k ≥ 3. Theorem 2.6. For any integer k ≥ 3, there is a (v, k)-MGR for some integer v ≤ 3k2/2. Proof. For 3 ≤ k ≤ 11, we refer to the results in Table 1. Indeed, for these values of k, there is a (v, k)-MGR for some integer v ≤ k2 − 1. For 12 ≤ k ≤ 24, we use Corollary 1.2. There is a (p2 + p+1, p+1, 1)-difference set in Zp2+p+1 for p = 11, 13, 16, 17, 19 and 23. If we delete δ = p + 1 − k elements from such a difference set, we obtain a (p2 + p+ 1, k)-MGR. For k = 12, we have p = 11 and δ = 0; for k = 13, 14, we have p = 13 and δ ≤ 1; for 15 ≤ k ≤ 17, we have p = 16 and δ ≤ 2; for k = 18, we have p = 17 and δ = 0; for k = 19, 20, we have p = 19 and δ ≤ 1; and for 21 ≤ k ≤ 24, we have p = 23 and δ ≤ 3. So, for 12 ≤ k ≤ 24, there is a 8 Ars Math. Contemp. 20 (2021) 1–27 (v, k)-MGR for some integer v ≤ (k + δ − 1)2 + (k + δ − 1) + 1 ≤ (k + 2)2 + k + 3 = k2 + 5k + 7. It is easy to verify that k2 + 5k + 7 ≤ 3k2/2 if k ≥ 12. Finally, suppose k ≥ 25. Let p be the smallest prime such that p ≥ k − 1. By a result of Nagura [19], we have p ≤ 6(k − 1)/5 < 6k/5. From Corollary 1.2, there exists a (p2 + p + 1, p + 1, 1)-difference set in Zp2+p+1. Delete p + 1 − k elements from this difference set to obtain a (p2 + p+ 1, k)-MGR. We have p2 + p+ 1 < ( 6k 5 )2 + 6k 5 + 1 < 3k2 2 , where the last inequality holds for k ≥ 21. Theorem 2.7. For any integer k ≥ 3 and any integer v ≥ 3k2 − 1, there is a (v, k)-MGR. Proof. From Theorem 2.6, there exists a (v, k)-MGR for some integer v ≤ 3k2/2. This ruler has length L ≤ 3k2/2 − 1. Applying Theorem 2.1, there is a (v, k)-MGR for all v ≥ 2(3k2/2− 1) + 1 = 3k2 − 1. Remark 2.8. Of course there are stronger results known on gaps between consecutive primes that hold for larger integers. For example, it was shown by Dusart [13] that, if k ≥ 89693, then there is at least one prime p such that k < p ≤ ( 1 + 1 ln3 k ) k. So improved versions of Theorems 2.6 and 2.7 could be proven that hold for sufficiently large values of k. 3 Nonexistence results for (v, k)-MGR We present several nonexistence results for infinite classes of modular Golomb rulers in this section. 3.1 (k2 − k + 2, k)-MGR We have noted that v ≥ k2 − k + 1 if a (v, k)-MGR exists, and the (k2 − k + 1, k)-MGR are equivalent to cyclic difference sets with λ = 1. There has been considerable study of these difference sets and various nonexistence results are known. We do not discuss this case further here, but we refer to [16, §8] for a good summary of known results. The next case is v = k2 − k + 2. First, we note that there are two small examples of (k2 − k + 2, k)-MGR, namely, an (8, 3)-MGR and a (14, 4)-MGR. These are found in Table 1. In fact, these are the only examples that are known to exist. We now discuss some nonexistence results for (k2 − k + 2, k)-MGR. M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 9 We next observe that (k2 − k+ 2, k)-MGR are equivalent to certain relative difference sets in the cyclic group Zk2−k+2. The proof of this easy result is left to the reader. Theorem 3.1. A (k2 − k + 2, k)-MGR is equivalent to a (Zk2−k+2, H, k, 1)-relative dif- ference set, where H is the unique subgroup of order 2 in Zk2−k+2, i.e., H = {0, (k2 − k + 2)/2}. It is well-known that relative difference sets give rise to certain square divisible designs, which we define now. A (w, u, k, λ1, λ2)-divisible design is a set system (actually, a type of group-divisible design) on v = uw points and having blocks of size k, such that the following conditions are satisfied: 1. the points are partitioned into u groups of size w, 2. two points in the same group occur together in exactly λ1 blocks, and 3. two points in different groups occur together in exactly λ2 blocks. If the number of blocks is the same as the number of points, then we have a square divisible design. The following result is a consequence of Theorem 3.1, since a square divisible design is obtained by developing a relative difference set through the relevant cyclic group. Theorem 3.2. If there exists a (k2 − k + 2, k)-MGR, then there exists a square divisible design with parameters w = 2, u = (k2 − k + 2)/2, λ1 = 0 and λ2 = 1. We will make use of some results due to Bose and Connor [4], as stated in [15, Propo- sition 1.8]. Theorem 3.3 (Bose and Connor). Suppose there exists a square divisible design with pa- rameters w, u, k, λ1 and λ2. Denote v = uw. Then the following hold. 1. If u is even, then k2 − λ2v is a perfect square. If furthermore u ≡ 2 (mod 4), then k − λ1 is the sum of two squares. 2. If u is odd and w is even, then k − λ1 is a perfect square and the equation (k2 − λ2v)x2 + (−1)u(u−1)/2λ2wy2 = z2 has a nontrivial solution in integers x, y and z. We can use Theorem 3.3 to obtain necessary conditions for the existence of (k2 − k + 2, k)-MGR. Corollary 3.4. Suppose there exists a (k2 − k + 2, k)-MGR. Then the following hold. 1. k ̸≡ 7 (mod 8). 2. If k ≡ 2 (mod 8), then k − 2 is a perfect square and k is the sum of two squares. 3. If k ≡ 3, 6 (mod 8), then k − 2 is a perfect square. 4. If k ≡ 0, 1 (mod 8), then k is a perfect square and the equation (k − 2)x2 + 2y2 = z2 has a nontrivial solution in integers x, y and z. 10 Ars Math. Contemp. 20 (2021) 1–27 5. If k ≡ 4, 5 (mod 8), then k is a perfect square and the equation (k − 2)x2 − 2y2 = z2 has a nontrivial solution in integers x, y and z. Proof. Suppose there exists a (k2 − k + 2, k)-MGR. Then, from Theorem 3.2, there is a square divisible design with parameters w = 2, u = (k2 − k + 2)/2, v = k2 − k + 2, λ1 = 0 and λ2 = 1. We apply Theorem 3.3, making use of the fact that k2 − λ2v = k− 2. First, we observe that u is even if and only if k ≡ 2, 3 (mod 4). Further, u ≡ 2 (mod 4) if and only if k ≡ 2, 7 (mod 8). If k ≡ 7 (mod 8), then k2 − λ2v = k − 2 ≡ 5 (mod 8), so k2 − λ2v is not a perfect square. Therefore, from part 1. of Theorem 3.3, a (k2 − k + 2, k)-MGR does not exist if k ≡ 7 (mod 8). If k ≡ 2 (mod 8), then part 1. of Theorem 3.3 says that k − 2 is a perfect square and k is the sum of two squares. If k ≡ 3, 6 (mod 8), then part 1. of Theorem 3.3 says that k − 2 is a perfect square. When k ≡ 0, 1 (mod 8), we have u ≡ 1 (mod 4) and hence (−1)u(u−1)/2 = 1. When k ≡ 4, 5 (mod 8), we have u ≡ 3 (mod 4) and hence (−1)u(u−1)/2 = −1. The stated results then follow immediately from part 2. of Theorem 3.3. 3.2 (k2 − k + 2ℓ, k)-MGR For v > k2−k+2, a (v, k)-MGR is not necessarily a relative difference set and it does not necessarily imply the existence of a square divisible design. So, in general, we cannot apply the results in Theorem 3.3. However, we can derive some nice necessary conditions for the existence of certain (v, k)-MGR using elementary counting arguments. These arguments are in the spirit of techniques introduced in [6, §2]; see also [17]. Before studying MGR, we present a simple example to illustrate the basic idea. Example 3.5. Suppose we have a (v, k, λ)-difference set in Zv when v is even. There are v/2 − 1 nonzero even differences and v/2 odd differences, each of which occurs λ times. Suppose the difference set consists of a even elements and b odd elements. Then a+ b = k and 2ab = λv/2. So a and b are the solutions of the quadratic equation x2 − kx+ λv 4 = 0. Since a and b are integers, the discriminant must be a perfect square. Therefore, k2 − λv is a square. However, k(k − 1) = λ(v − 1), so k2 − λv = k − λ must be a perfect square. (Of course, this condition is the same as in the Bruck-Ryser-Chowla Theorem for v even, which holds for any symmetric BIBD.) In the next theorem, we will use this counting technique to obtain necessary conditions for the existence of a (k2 − k + 2ℓ, k)-MGR for a given integer ℓ ≥ 1. First, we give a couple of definitions that will be useful in the rest of the paper. Suppose X is a (v, k)-MGR. Define ∆X = {x− y mod v : x, y ∈ X,x ̸= y} and L(X) = Zv \∆X. M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 11 Note that ∆X consists of all the differences obtained from pairs of distinct elements in X and L(X) is the complement of ∆X . The set L(X) is called the leave of X . For i = 0, 1, define Li(X) to consist of the elements of L(X) that are congruent to i modulo 2. The following lemma is straightforward but useful. Lemma 3.6. Suppose X is a (v, k)-MGR where v is even. Then {0, v/2} ⊆ L(X). If v ≡ 0 (mod 4), then |L0(X)| and |L1(X)| are both even. If v ≡ 2 (mod 4), then |L0(X)| and |L1(X)| are both odd. Proof. It is evident that 0 ∈ L(X). Also, if we have x − y = v/2 for some pair (x, y) ∈ X × X , then we have y − x = v/2 as well. This would imply that v/2 appears at least twice as a difference, which is not allowed. Hence {0, v/2} ⊂ L(X). Now note that if d ∈ ∆X , then v − d ∈ ∆X as well. Consequently, if d ∈ L(X), then v−d ∈ L(X). Of course d = v−d if and only if d = 0 or d = v/2. The remaining elements of Zv can be matched into pairs (d, v − d) having the same parity. Thus, considering that v/2 is even or odd according to whether v ≡ 0 or 2 modulo 4, respectively, it is clear that |L1(X)| and |L2(X)| are both even in the first case and both odd in the second. Theorem 3.7. Suppose v = k2− k+2ℓ, where ℓ ≥ 1, and suppose there is a (v, k)-MGR. Then the following hold. 1. If v ≡ 2 (mod 4), then k − 2ℓ + 2 + 4i is a perfect square for some integer i ∈ {0, . . . , ℓ− 1}. 2. If v ≡ 0 (mod 4), then k − 2ℓ+ 4i is a perfect square for some integer i ∈ {0, . . . , ℓ− 1}. Proof. Let X be a (v, k)-MGR. Since |X| = k, we have |L(X)| = v − (k2 − k) = 2ℓ. Suppose X contains a even elements and b odd elements; then a+ b = k. Suppose first that v ≡ 2 (mod 4), so v/2 is odd. From Lemma 3.6, |L1(X)| is odd, say |L1(X)| = 2i+ 1, and v/2 ∈ L1(X). Therefore, 0 ≤ i ≤ ℓ− 1. The quantity 2ab is equal to the number of odd differences in ∆X , so 2ab = v 2 − (2i+ 1) = v − 2− 4i 2 . It follows that a and b are the solutions of the quadratic equation x2 − kx+ v − 2− 4i 4 = 0. The solutions a and b must be integers, which can happen only if the discriminant is a perfect square. Hence, k2 − (v − 2− 4i) = k − 2ℓ+ 2 + 4i is a perfect square. Hence, k − 2ℓ + 2 + 4i is a perfect square for some integer i ∈ {0, . . . , ℓ− 1}. 12 Ars Math. Contemp. 20 (2021) 1–27 The proof is similar when v ≡ 0 (mod 4). Here, from Lemma 3.6, |L1(X)| is even, say |L1(X)| = 2i and {0, v/2} ⊆ L0(X). Since {0, v/2} ⊆ L0(X), we have |L1(X)| ≤ 2ℓ− 2. Hence i ∈ {0, . . . , ℓ− 1}. We have 2ab = v 2 − 2i = v − 4i 2 . It follows that a and b are the solutions of the quadratic equation x2 − kx+ v − 4i 4 = 0. The solutions a and b must be integers, which can happen only if the discriminant is a perfect square. Hence, k2 − (v − 4i) = k − 2ℓ+ 4i is a perfect square. Hence, k − 2ℓ + 4i is a perfect square for some integer i ∈ {0, . . . , ℓ− 1}. Example 3.8. Suppose k = 10 and v = 94 = 10×9+2×2, ℓ = 2. Here v ≡ 2 (mod 4). Then we compute 10− 2× 2 + 2 + 4i = 8 + 4i for i = 0, 1, obtaining 8 and 12. Neither of these is a perfect square, so we conclude that a (94, 10)-MGR does not exist. It is interesting to see what Theorem 3.7 tells us when ℓ = 1. Corollary 3.9. Suppose there is a (k2 − k + 2, k)-MGR. Then the following hold. 1. If k ≡ 2, 3 (mod 4), then k − 2 is a perfect square. 2. If k ≡ 0, 1 (mod 4), then k is a perfect square. Proof. Take ℓ = 1 in Theorem 3.7; then v = k2 − k + 2 and we have i = 0. We note that v ≡ 0 (mod 4) if k ≡ 2, 3 (mod 4) and v ≡ 2 (mod 4) if k ≡ 0, 1 (mod 4), so the stated results follow immediately. Remark 3.10. We observe that Theorem 3.2 and Corollary 3.4 provide stronger necessary conditions for the existence of (k2 − k + 2, k)-MGR than those stated in Corollary 3.9. For certain values of k, we are able to find “intervals” in which MGR cannot exist. Define Sk,ℓ = {k − 2ℓ+ 2 + 4i : 0 ≤ i ≤ ℓ− 1} and define Tk,ℓ = {k − 2ℓ+ 4i : 0 ≤ i ≤ ℓ− 1}. Lemma 3.11. Suppose v = k2 − k + 2ℓ. 1. If v ≡ 2 (mod 4), then all elements of Sk,ℓ are ≡ 0, 1 (mod 4). 2. If v ≡ 0 (mod 4), then all elements of Tk,ℓ are ≡ 0, 1 (mod 4). M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 13 Proof. We prove 1. Suppose v = 2ℓ+k2−k ≡ 2 (mod 4). Then 2ℓ+k2−k−2−4i ≡ 0 (mod 4). It follows that k2 ≡ k − 2ℓ+ 2 + 4i (mod 4). Since k2 ≡ 0, 1 (mod 4) for all integers k, the result follows. The proof of 2. is similar. Theorem 3.12. Let t be a positive integer. 1. If k = 4t2 + 4t+ 4, then there does not exist a (k2 − k + 4s, k)-MGR for all s such that 1 ≤ s ≤ t. 2. If k = 4t2 + 4t+ 2, then there does not exist a (k2 − k + 4s, k)-MGR for all s such that 1 ≤ s ≤ t. 3. If k = 4t2 + 3, then there does not exist a (k2 − k + 4s− 2, k)-MGR for all s such that 1 ≤ s ≤ t. 4. If k = 4t2 + 1, then there does not exist a (k2 − k + 4s− 2, k)-MGR for all s such that 1 ≤ s ≤ t. Proof. We prove 1. Denote ℓ = 2s, where 1 ≤ s ≤ t and let v = k2 − k + 4s. Since k ≡ 0 (mod 4), we have v ≡ 0 (mod 4). So we examine the elements in Tk,ℓ, which are all congruent to 0 modulo 4 by Lemma 3.11. For the smallest element of Tk,ℓ, which is k − 2ℓ, we have k − 2ℓ ≥ k − 4t = 4(t2 + t+ 1)− 4t = 4t2 + 4 > (2t)2. Similarly, for the largest element of Tk,ℓ, which is k − 2ℓ+ 4(ℓ− 1), we have k − 2ℓ+ 4(ℓ− 1) ≤ k + 4t− 4 = 4(t2 + t+ 1) + 4t− 4 = 4t2 + 8t < (2t+ 2)2. Since all the elements of Tk,ℓ are congruent to 0 modulo 4 and they are between two consecutive even squares, there cannot be any perfect squares in the set Tk,ℓ. The proofs of 2., 3. and 4. are similar. Example 3.13. If we take t = 3 in Theorem 3.12, we see that there does not exist a (k2 − k + 4, k)-MGR, a (k2 − k + 8, k)-MGR or a (k2 − k + 12, k)-MGR when k = 50, 52. Further, there does not exist a (k2 − k + 2, k)-MGR, a (k2 − k + 6, k)-MGR or a (k2 − k + 10, k)-MGR when k = 37, 39. We will show that we can improve Theorem 3.7 when v ≡ 0 (mod 4). First we state and prove a simple numerical lemma. 14 Ars Math. Contemp. 20 (2021) 1–27 Lemma 3.14. Let a be a positive integer. Then{ h(a− h) : 0 ≤ h ≤ ⌊a 2 ⌋} = {(a 2 )2 − (a 2 − h )2 : 0 ≤ h ≤ ⌊a 2 ⌋} . (3.1) Further, if a is even, then{ h(a− h) : 0 ≤ h ≤ a 2 } = {(a 2 )2 − h2 : 0 ≤ h ≤ a 2 } . (3.2) Proof. Clearly we have h(a− h) = (a 2 )2 − (a 2 − h )2 . Therefore (3.1) holds. If a is even, then{(a 2 )2 − (a 2 − h )2 : 0 ≤ h ≤ a 2 } = {(a 2 )2 − h2 : 0 ≤ h ≤ a 2 } , and (3.2) holds. Theorem 3.15. Suppose that X is a (v, k)-MGR with v = k2−k+2ℓ. Then the following hold. 1. If v ≡ 0 (mod 8), then there exist integers i ∈ {0, 1, . . . , ℓ− 1} and j ∈ {0, 1, . . . , ℓ− 1− i} such that k− 2ℓ+4i is a perfect square and k− 2ℓ+2i+4j is a sum of two squares. 2. If v ≡ 4 (mod 8), then there exist integers i ∈ {0, 1, . . . , ℓ− 1} and j ∈ {0, 1, . . . , ℓ− 1− i} such that that k− 2ℓ+ 4i is a perfect square and k− 2ℓ+ 2i+ 4j + 2 is a sum of two squares. Proof. Suppose v ≡ 0 (mod 8); then v/2 ≡ 0 (mod 4). From Lemma 3.6 and the proof of Theorem 3.7, there are an even number, say 2i, of odd elements in L(X), where 0 ≤ i ≤ ℓ − 1. The number of elements ≡ 2 (mod 4) that are in L(X) is also even, say 2j, and we must have 0 ≤ j ≤ ℓ− 1− i. Let a and b be the number of even and odd elements in X , respectively. We showed in the proof of Theorem 3.7 that a and b are the solutions to the quadratic equation x2 − kx+ v 4 − i = 0, and hence a+ b = k, ab = v4 − i, and k 2 − v + 4i = k − 2ℓ+ 4i is a perfect square. Let nα be the number of elements of X that are congruent to α modulo 4, for α = 0, 1, 2, 3. It is evident that n0 + n2 = a and that n1 + n3 = b. Thus, from (3.1) in Lemma 3.14, we have n0n2 ∈ { h(a− h) : 0 ≤ h ≤ ⌊a 2 ⌋} = {(a 2 )2 − (a 2 − h )2 : 0 ≤ h ≤ ⌊a 2 ⌋} and n1n3 ∈ { h(b− h) : 0 ≤ h ≤ ⌊ b 2 ⌋} = {( b 2 )2 − ( b 2 − h )2 : 0 ≤ h ≤ ⌊ b 2 ⌋} . M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 15 Multiplying by four, we get: 4n0n2 ∈ { a2 − (a− 2h)2 : 0 ≤ h ≤ ⌊a 2 ⌋} (3.3) and 4n1n3 ∈ { b2 − (b− 2h)2 : 0 ≤ h ≤ ⌊ b 2 ⌋} . (3.4) Now note that 2n0n2 + 2n1n3 is the number of differences in ∆X that are congruent to 2 modulo 4, which of course is also equal to v4 − 2j. Thus, from (3.3) and (3.4), there are integers h1, h2 such that 0 ≤ h1 ≤ ⌊ a 2 ⌋ , 0 ≤ h2 ≤ ⌊ b 2 ⌋ and a2 − (a− 2h1)2 + b2 − (b− 2h2)2 = v 2 − 4j. (3.5) Using the facts that a+ b = k and ab = v 4 − i, we have a2 + b2 = (a+ b)2 − 2ab = k2 − v 2 + 2i. Substituting this into (3.5), we have k2 − v 2 + 2i− (a− 2h1)2 − (b− 2h2)2 = v 2 − 4j, or k2 − v + 2i+ 4j = (a− 2h1)2 + (b− 2h2)2. Since v = k2 − k + 2ℓ, we obtain k − 2ℓ+ 2i+ 4j = (a− 2h1)2 + (b− 2h2)2. We conclude that k − 2ℓ+ 2i+ 4j is a sum of two squares. Suppose v ≡ 4 (mod 8). As before, there are an even number, say 2i, of odd elements in L(X), where 0 ≤ i ≤ ℓ − 1. However, v/2 ≡ 2 (mod 4), so the number of elements ≡ 2 (mod 4) that are not in ∆X is an odd number, say 2j + 1, where 0 ≤ j ≤ ℓ− 1− i. Reasoning exactly as in the case where v ≡ 0 (mod 8), we find that k − 2ℓ + 4i is a perfect square and that k − 2ℓ+ 2i+ 4j + 2 is a sum of two squares. We now give an application of Theorem 3.15. Corollary 3.16. Suppose that k = n2 − 2ℓ + 4 where ℓ ≥ 1 and n ≥ ℓ + 1. Let v = k2 − k + 2ℓ. 1. If v ≡ 0 (mod 8) and k − 2 is not the sum of two squares, then a (v, k)-MGR does not exist. 16 Ars Math. Contemp. 20 (2021) 1–27 2. If v ≡ 4 (mod 8) and k is not the sum of two squares, then a (v, k)-MGR does not exist. Proof. We note that k − 2ℓ + 4(ℓ − 1) = n2 is a perfect square. We claim there are no squares of the form k − 2ℓ + 4i where 0 ≤ i ≤ ℓ − 2. This is because the smallest such integer is k − 2ℓ = n2 − 4ℓ+ 4 ≥ n2 − 4(n− 1) + 4 = n2 − 4n+ 8 = (n− 2)2 + 4. Since all these integers have the same parity as n2 and they are not larger than k − 2ℓ + 4(ℓ − 1) = n2, the result follows. Therefore i = ℓ − 1 is the only value in [0, ℓ − 1] such that k − 2ℓ+ 4i is a perfect square. Now, in applying Theorem 3.15, we need to check that a certain condition holds for 0 ≤ j ≤ ℓ − 1 − i. Since i = ℓ − 1, we only need to consider j = 0. Theorem 3.15 then states that a (v, k)-MGR does not exist if v ≡ 0 (mod 8) and k − 2ℓ+ 2(ℓ− 1) = k − 2 is not a sum of two squares; or if v ≡ 4 (mod 8) and k − 2ℓ + 2(ℓ − 1) + 2 = k is not a sum of two squares. (It is not hard to verify that v ≡ 0 (mod 4), so either v ≡ 0 (mod 8) or v ≡ 4 (mod 8).) We give some examples to illustrate results that can be obtained using Corollary 3.16. Example 3.17. Suppose we take n = 4t + 2 and ℓ = 5 in Corollary 3.16. Then v = k2 − k + 10 ≡ 0 (mod 8). Here we have k − 2 = (4t+ 2)2 − 10 + 4− 2 = 4(4t2 + 4t− 1). This integer is not the sum of two squares because 4t2 + 4t− 1 ≡ 3 (mod 4). Hence, no (k2 − k + 10, k)-MGR exists if k = 4(2t+ 1)2 − 6. The first values of k covered by this result are k = 30, 94, 190, 318, 478, 670, 894, 1150, 1438, 1758. Example 3.18. Suppose we take n = 4t + 2 and ℓ = 3 in Corollary 3.16. Then v = k2 − k + 6 ≡ 0 (mod 8). Here we have k − 2 = (4t+ 2)2 − 6 + 4− 2 = 16t2 + 16t. This integer is the sum of two squares if and only if t2+t is the sum of two squares. Hence, no (k2 − k + 10, k)-MGR exists if k = 4(2t + 1)2 − 2 and t2 + t is not the sum of two squares. The first values of k covered by this result are k = 98, 194, 482, 674, 898, 1762, 2114, 2498, 2914 and 3362. Example 3.19. Suppose we take n = 4t and ℓ = 5 in Corollary 3.16. Then v = k2 − k + 10 ≡ 4 (mod 8). Here we have k = 16t2 − 6 = 2(8t2 − 3). This integer is the sum of two squares if and only if 8t2 − 3 is the sum of two squares. Hence, no (k2 − k+10, k)-MGR exists if k = (4t)2 − 6 and 8t2 − 3 is not the sum of two squares. The first values of k covered by this result are k = 138, 5704, 1290, 2298, 2698, 3594, 5178, 6394, 7050 and 9210. M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 17 4 Nonexistence results for (v, k, 1)-OOC In this section, we prove nonexistence results for some optimal (v, k, 1)-optical orthogonal codes of size n > 1. Note that we are investigating the cases where v is even in this section. Lemma 4.1. Suppose 1 ≤ ℓ ≤ ( k 2 ) and v = k(k − 1)n+ 2ℓ. Then a (v, k, 1)-OOC of size n is optimal. Proof. For v as given, we have⌊ v − 1 k(k − 1) ⌋ = n+ ⌊ 2ℓ− 1 k(k − 1) ⌋ . However, 2ℓ− 1 < k(k − 1) because ℓ ≤ ( k 2 ) , so⌊ v − 1 k(k − 1) ⌋ = n. Suppose X = {X1, . . . , Xn} is a (v, k, 1)-optical orthogonal code. We define ∆X and the leave, L(X), in the obvious way: ∆X = n⋃ i=1 {x− y mod v : x, y ∈ Xi, x ̸= y} and L(X) = Zv \∆X. The following lemma is a straightforward generalization of Lemma 3.6. Lemma 4.2. Suppose X is a (v, k, 1)-optical orthogonal code where v is even. Then {0, v/2} ⊆ L(X). If v ≡ 0 (mod 4), then |L0(X)| and |L1(X)| are both even. If v ≡ 2 (mod 4), then |L0(X)| and |L1(X)| are both odd. Theorem 4.3. Given v = k(k − 1)n+ 2ℓ with 1 ≤ ℓ ≤ ( k 2 ) , define the two sets S = {⌊v 4 ⌋ − h : 0 ≤ h ≤ ℓ− 1 } . and T = { h(k − h) : 0 ≤ h ≤ ⌊ k 2 ⌋} . Then a necessary condition for the existence of an optimal (v, k, 1)-OOC is that at least one element of S is representable as a sum of n integers of T . Proof. Note than an optimal (v, k, 1)-OOC will have size n, from Lemma 4.1. Assume that X = {X1, . . . , Xn} is an (optimal) (v, k, 1)-OOC. From Lemma 4.2, we see that v/2 ∈ L(X) and |L1(X)| has the same parity as v2 . Also, as in the proof of Lemma 3.7, 0 ≤ |L1(X)| ≤ 2ℓ − 2. Thus, considering that the number of odd elements in Zv is v/2, we see that the number of odd differences in ⋃n i=1 ∆Xi is twice an element of S. Suppose that Xi contains exactly ai even elements, so k − ai is the number of odd elements in Xi. Then the number of odd elements in ∆Xi is 2ai(k − ai), that is, twice an element of T . It follows that at least one element of S is representable as a sum of n integers belonging to T . 18 Ars Math. Contemp. 20 (2021) 1–27 Let us see some consequences of Theorem 4.3. As a first example, we consider the cases where k = 3. Corollary 4.4. An optimal (v, 3, 1)-OOC does not exist if v ≡ 14, 20 (mod 24). Proof. When we take k = 3 in Theorem 4.3, we have T = {0, 2}. Suppose v is even and we write v = 24t+2w, where 1 ≤ w ≤ 12. We express v in the form v = 6n+2ℓ, where 1 ≤ ℓ ≤ 3, obtaining the values of n and ℓ and the sets S that are shown in Table 2. Table 2: Applications of Theorem 4.3 when k = 3. v n ℓ S 24t+ 2 4t 1 {6t} 24t+ 4 4t 2 {6t, 6t+ 1} 24t+ 6 4t 3 {6t− 1, 6t, 6t+ 1} 24t+ 8 4t+ 1 1 {6t+ 2} 24t+ 10 4t+ 1 2 {6t+ 1, 6t+ 2} 24t+ 12 4t+ 1 3 {6t+ 1, 6t+ 2, 6t+ 3} 24t+ 14 4t+ 2 1 {6t+ 3} 24t+ 16 4t+ 2 2 {6t+ 3, 6t+ 4} 24t+ 18 4t+ 2 3 {6t+ 2, 6t+ 3, 6t+ 4} 24t+ 20 4t+ 3 1 {6t+ 5} 24t+ 22 4t+ 3 2 {6t+ 4, 6t+ 5} 24t+ 24 4t+ 3 3 {6t+ 4, 6t+ 5, 6t+ 6} When v ≡ 14, 20 (mod 24), the set S consists of a single element, which is an odd integer. Clearly it is not a sum of even integers, so we conclude from Theorem 4.3 that an optimal (v, 3, 1)-OOC does not exist if v ≡ 14, 20 (mod 24). Remark 4.5. It is well-known that an optimal (v, 3, 1)-OOC exists if and only if v ̸≡ 14, 20 (mod 24) (e.g., see [1, 2] for discussion about this result). We adapt the argument used in Corollary 4.4 to prove a generalization that works for odd integers k ̸≡ 1 (mod 8). First, we observe that, if k is odd, then all the elements of T are even. So we obviously get a contradiction in Theorem 4.3 if the set S consists of a single odd integer. This happens if ℓ = 1 (so v = nk(k − 1) + 2) and one of the following two conditions hold: 1. nk(k − 1) ≡ 2 (mod 8) (v ≡ 0 (mod 4) in this case) or 2. nk(k − 1) ≡ 4 (mod 8) (v ≡ 2 (mod 4) in this case). Since k is odd, we have k ≡ 1, 3, 5, 7 (mod 8). We consider each case separately. k ≡ 1 (mod 8): Here k(k − 1) ≡ 0 (mod 8), neither of 1. or 2. can hold. k ≡ 3 (mod 8): Here k(k−1) ≡ 6 (mod 8). For 1., we obtain 6n ≡ 2 (mod 8), so n ≡ 3 (mod 4) and v = (4t+ 3)k(k − 1) + 2 for some integer t. It follows that v ≡ 3k(k − 1) + 2 (mod 4k(k − 1)). M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 19 For 2., we obtain 6n ≡ 4 (mod 8), so n ≡ 2 (mod 4) and v = (4t+2)k(k−1)+2 for some integer t. It follows that v ≡ 2k(k − 1) + 2 (mod 4k(k − 1)). k ≡ 5 (mod 8): Here k(k − 1) ≡ 4 (mod 8). For 1., we obtain 4n ≡ 2 (mod 8), which is impossible. For 2., we obtain 4n ≡ 4 (mod 8), so n ≡ 1 (mod 2) and v = (2t+ 1)k(k − 1) + 2 for some integer t. It follows that v ≡ k(k − 1) + 2 (mod 2k(k − 1)). k ≡ 7 (mod 8): Here k(k−1) ≡ 2 (mod 8). For 1., we obtain 2n ≡ 2 (mod 8), so n ≡ 1 (mod 4) and v = (4t+ 1)k(k − 1) + 2 for some integer t. It follows that v ≡ k(k − 1) + 2 (mod 4k(k − 1)). For 2., we obtain 2n ≡ 4 (mod 8), so n ≡ 2 (mod 4) and v = (4t+2)k(k−1)+2 for some integer t. It follows that v ≡ 2k(k − 1) + 2 (mod 4k(k − 1)). Summarizing the above discussion, we have the following theorem. Theorem 4.6. There does not exist an optimal (v, k, 1)-OOC whenever one of the following conditions hold: • k ≡ 3 (mod 8) and v ≡ 3k(k − 1) + 2 (mod 4k(k − 1)). • k ≡ 3 (mod 8) and v ≡ 2k(k − 1) + 2 (mod 4k(k − 1)). • k ≡ 5 (mod 8) and v ≡ k(k − 1) + 2 (mod 2k(k − 1)). • k ≡ 7 (mod 8) and v ≡ k(k − 1) + 2 (mod 4k(k − 1)). • k ≡ 7 (mod 8) and v ≡ 2k(k − 1) + 2 (mod 4k(k − 1)). The following results are immediate corollaries of Theorem 4.6. Corollary 4.7. An optimal (v, 3, 1)-OOC does not exist if v ≡ 14, 20 (mod 24); an opti- mal (v, 5, 1)-OOC does not exist if v ≡ 22 (mod 40); and an optimal (v, 7, 1)-OOC does not exist if v ≡ 44, 86 (mod 168). Example 4.8. As an example where Theorem 4.3 can be applied to an even value of k, consider the case of an optimal (62, 6, 1)-OOC. Here we have 62 = 2× 6× 5 + 2× 1, so n = 2 and ℓ = 1. The set S = {15} and T = {0, 5, 8, 9}. It is impossible to express 15 as the sum of two numbers from T , so we conclude that an optimal (62, 6, 1)-OOC does not exist. We now prove some general nonexistence results. 20 Ars Math. Contemp. 20 (2021) 1–27 Theorem 4.9. Suppose 1 ≤ ℓ ≤ ( k 2 ) , and suppose an optimal (2k(k− 1) + 2ℓ, k, 1)-OOC exists. Define the set R as follows: R =  {⌊ k−ℓ+1 2 ⌋ + h : 0 ≤ h ≤ ℓ− 1 } if k is even; {k − ℓ+ 2h : 0 ≤ h ≤ ℓ− 1} if k is odd and ℓ is even; {k − ℓ+ 2h+ 1 : 0 ≤ h ≤ ℓ− 1} if k and ℓ are both odd. Then at least one integer in the set R can be expressed as the sum of two squares. Proof. First, suppose k is even. Apply Theorem 4.3. We have v = 2k(k−1)+2ℓ and thus we have S = { k(k − 1) 2 + ⌊ ℓ 2 ⌋ − h : 0 ≤ h ≤ ℓ− 1 } . From Lemma 3.14, we have T = {( k 2 )2 − h2 : 0 ≤ h ≤ k 2 } . From Theorem 4.3, we have k(k − 1) 2 + ⌊ ℓ 2 ⌋ − h = ( k 2 )2 − i2 + ( k 2 )2 − j2 for integers h, i, j where 0 ≤ h ≤ ℓ− 1 and 0 ≤ i, j ≤ k/2. Simplifying, we obtain k 2 − ⌊ ℓ 2 ⌋ + h = i2 + j2. The result follows by noting that k 2 − ⌊ ℓ 2 ⌋ = ⌊ k − ℓ+ 1 2 ⌋ since k is even. Next, suppose k is odd and ℓ is even. Here v ≡ 0 (mod 4). We again apply Theo- rem 4.3. Here we have S = { k(k − 1) + ℓ 2 − h : 0 ≤ h ≤ ℓ− 1 } and, from Lemma 3.14, we have T = {( k 2 )2 − ( k 2 − h )2 : 0 ≤ h ≤ k − 1 2 } . From Theorem 4.3, we get k(k − 1) + ℓ 2 − h = ( k 2 )2 − ( k 2 − i )2 + ( k 2 )2 − ( k 2 − j )2 M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 21 for integers h, i, j where 0 ≤ h ≤ ℓ− 1 and 0 ≤ i, j ≤ (k − 1)/2. Simplifying, we have 2k(k − 1) + 2ℓ− 4h = 2k2 − (k − 2i)2 − (k − 2j)2. Therefore, (k − 2i)2 + (k − 2j)2 = 2(k − ℓ+ 2h), and the result follows. The final case is when k and ℓ are both odd. The proof for this case is very similar to previous case. Corollary 4.10. Suppose that k has prime decomposition that contains a prime p ≡ 3 (mod 4) raised to an odd power. Then an optimal (2k(k − 1) + 2, k, 1)-OOC does not exist. Proof. Suppose an optimal (2k(k − 1) + 2, k, 1)-OOC exists. Take ℓ = 1 in Theorem 4.9; then h = 0 in the definition of the set R. It follows that, if k is even, then k/2 is the sum of two squares; and if k is odd, then k is the sum of two squares. The desired result then follows from Theorem 1.9. Remark 4.11. The smallest applications of Corollary 4.10 are when k = 3 and k = 6. We conclude that optimal (14, 3, 1)-OOC and optimal (62, 6, 1)-OOC do not exist. We note that Corollary 4.4 also shows that an optimal (14, 3, 1)-OOC does not exist. Also, Ex- ample 4.8 proved the nonexistence of an optimal (62, 6, 1)-OOC using a slightly different argument. The next values of k covered by Corollary 4.10 are k = 7, 11, 12, 14, 15, 19, 21, 22, 23 and 24. Now we prove a nonexistence result that holds for arbitrarily large values of ℓ. Theorem 4.12. For any positive integer ℓ, there are infinitely many even integers k such that an optimal (2k(k − 1) + 2ℓ, k, 1)-OOC does not exist. Proof. Using Lemma 1.10, choose an even integer k such that ⌊ k−ℓ+1 2 ⌋ + h is not the sum of two squares, for 0 ≤ h ≤ ℓ− 1. Then apply Theorem 4.9. We next prove the nonexistence of certain optimal (3k(k − 1) + 2, k, 1)-OOC with k even. Theorem 4.13. There does not exist an optimal (3k(k − 1) + 2, k, 1)-OOC if k = (4a+1(24c+ 7) + 2)/3 with a, c ≥ 0 or if k = 4a+1(8c+ 5) with a, c ≥ 0. Proof. Assume that X is an optimal (3k(k − 1) + 2, k, 1)-OOC with k even. We apply Theorem 4.3 with n = 3. Here, with the usual notation, we have S = { 3k2 − 3k + 2 4 } if k ≡ 2 (mod 4), and S = { 3k2 − 3k 4 } 22 Ars Math. Contemp. 20 (2021) 1–27 if k ≡ 0 (mod 4). Also, as in the proof of Theorem 4.9, we have T = {( k 2 )2 − h2 : 0 ≤ h ≤ k 2 } . It follows that the unique element in the set S must be a sum of three elements of T . For k ≡ 2 (mod 4), we have 3k2 − 3k + 2 4 = 3 ( k 2 )2 − (h21 + h22 + h23) for integers h1, h2, h3. It follows that (3k − 2)/4 is a sum of three squares, and hence (3k − 2)/4 is not of the form 4a(8b+ 7) where a, b ≥ 0. Thus, if 3k − 2 4 = 4a(8b+ 7), (4.1) an optimal (3k(k − 1) + 2, k, 1)-OOC does not exist. (4.1) holds if and only if k = 4a+1(8b+ 7) + 2 3 . In order for k to be an integer, b must be divisible by 3, say b = 3c. Therefore, if k = 4a+1(24c+ 7) + 2 3 , where a, c ≥ 0, an optimal (3k(k − 1) + 2, k, 1)-OOC does not exist. The case k ≡ 0 (mod 4) is similar. Here, 3k/4 must be a sum of three squares, and hence 3k/4 is not of the form 4a(8b+7). Therefore an optimal (3k(k− 1)+2, k, 1)-OOC does not exist if k = 4a+1(8b+ 7) 3 . In order for k to be an integer, we must have b ≡ 1 (mod 3), say b = 3c + 1. Then (8b + 7)/3 = 8c + 5. We conclude that an optimal (3k(k − 1) + 2, k, 1)-OOC does not exist if k = 4a+1(8c+ 5), where a, c ≥ 0. Finally, we prove the nonexistence of certain optimal (3k(k − 1) + 4, k, 1)-OOC with k even. Theorem 4.14. There does not exist an optimal (3k(k − 1) + 4, k, 1)-OOC if k = (4a+3(24c+ 23)− 2)/3 with a, c ≥ 0 or if k = 4a+3(8c+ 5) with a, c ≥ 0. Proof. We proceed as in the proof of Theorem 4.13, by applying Theorem 4.3 with n = 3. Assume that X is an optimal (3k(k − 1) + 4, k, 1)-OOC with k even. We have S = { 3k2 − 3k − 2 4 , 3k2 − 3k − 2 4 + 1 } M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 23 if k ≡ 2 (mod 4), and S = { 3k2 − 3k 4 , 3k2 − 3k 4 + 1 } if k ≡ 0 (mod 4). Also, T = {( k 2 )2 − h2 : 0 ≤ h ≤ k 2 } . At least one element in the set S must be a sum of three elements of T . Suppose k ≡ 2 (mod 4) and let n = (3k + 2)/4 − 1. Proceeding as in the proof of Theorem 4.13, we see that one of n or n + 1 is the sum of three squares. However, if n+ 1 = 4a(8b+ 7) where a ≥ 2, then Lemma 1.11 implies that neither n nor n+ 1 is the sum of three squares. In this case, optimal (3k(k − 1) + 4, k, 1)-OOC does not exist. This occurs when 3k + 2 4 = 4a(8b+ 7), with a ≥ 2, or k = 4a+1(8b+ 7)− 2 3 . Since k is an integer, b ≡ 2 (mod 3), say b = 3c+ 2, and then k = 4a+1(24c+ 23)− 2 3 , where a ≥ 2. For k of this form, an optimal (3k(k − 1) + 4, k, 1)-OOC does not exist. Suppose k ≡ 0 (mod 4) and let n = 3k/4 − 1. Here, by the same logic as above, an optimal (3k(k − 1) + 4, k, 1)-OOC does not exist when 3k 4 = 4a(8b+ 7), or k = 4a+1(8b+ 7) 3 , where a ≥ 2. Here, b ≡ 1 (mod 3), say b = 3c+ 1, and then k = 4a+1(8c+ 5), where a ≥ 2. For k of this form, an optimal (3k(k− 1)+ 4, k, 1)-OOC does not exist. 5 Other types of designs In this section, we obtain necessary conditions for the existence of certain cyclic Steiner 2-designs and relative difference families using the techniques we have developed. 24 Ars Math. Contemp. 20 (2021) 1–27 5.1 Cyclic Steiner 2-designs A Steiner 2-design of order v and block-size k, denoted as S(2, k, v), consists of a set of k-subsets (called blocks) of a v-set (whose elements are called points) such that every pair of points occurs in a unique block. An S(2, k, v) is cyclic if there is a cyclic permutation of the v points that maps every block to a block. It is well-known that a cyclic S(2, k, v) exists only if v ≡ 1 or k (mod k(k − 1)). A cyclic S(2, k, v) with v ≡ 1 (mod k(k − 1)) is equivalent to a (v, k, 1)-OOC of size n; in this case the leave is {0}. Further, a cyclic S(2, k, v) with v ≡ k (mod k(k − 1)) is equivalent to a (v, k, 1)-OOC of size n whose leave is the subgroup of Zv of order k. Assume that X = {X1, . . . , Xn} is an (k(k − 1)n + k, k, 1)-OOC of size n that is obtained from a cyclic S(2, k, k(k − 1)n + k) with both k and n even. The leave L(X) has exactly k/2 odd elements and therefore the number of odd differences in ⋃n i=1 ∆Xi is k(k − 1)n/2. Reasoning as in the proof of Theorem 4.9, we see that k(k − 1)n/4 is the sum of n integers in the set T = {( k 2 )2 − h2 : 0 ≤ h ≤ k 2 } . Thus we have kn 4 = h21 + h 2 2 + · · ·+ h2n for a suitable n-tuple (h1, . . . , hn) of nonnegative integers, each of which does not exceed k/2. Using Lagrange’s Four-square Theorem (Theorem 1.9), it is an easy exercise to see that such an n-tuple certainly exists for n ≥ 4. However, if n = 2, this is not always the case. Here we require k 2 = h21 + h 2 2 for nonnegative integers h1, h2 ≤ k/2. As stated in Theorem 1.9, a positive integer can be written as the as a sum of two squares if and only if its prime decomposition contains no prime p ≡ 3 (mod 4) raised to an odd power. So we obtain the following result. Theorem 5.1. If k is an even integer whose prime decomposition contains a prime p ≡ 3 (mod 4) raised to an odd power, then there does not exists a cyclic S(2, k, 2k(k− 1)+ k). We can apply Theorem 5.1 with k = 6, 12, 14, 22, 24, 28, etc. Now assume that X = {X1, . . . , Xn} is a (k(k − 1)n+ k, k, 1)-OOC that is obtained from a cyclic S(2, k, k(k − 1)n + k) with k even and n odd. Here all the elements of the leave of X are odd, and hence all (k(k− 1)n+ k)/2 odd elements of Zv have to appear in⋃n i=1 ∆Xi. Reasoning as above, we see that k(k−1)n+k 4 is the sum of n integers in the set T = {( k 2 )2 − h2 : 0 ≤ h ≤ k 2 } , i.e., k(n− 1) 4 = h21 + h 2 2 + · · ·+ h2n M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 25 for a suitable n-tuple (h1, . . . , hn) of nonnegative integers not exceeding k/2. Again, such a n-tuple exists by Lagrange’s Four-square Theorem if n ≥ 5. But this is not always the case if n = 3. Here we require k 2 = h21 + h 2 2 + h 2 3 for nonnegative integers h1, h2, h3 ≤ k/2. Applying Legendre’s Three-square Theorem (Theorem 1.9), we have the following re- sult. Theorem 5.2. If k = 2a(8b+7) where a and b are nonnegative integers and a is odd, then there does not exist a cyclic S(2, k, 3k(k − 1) + k). We can apply Theorem 5.1 with k = 14, 46, 56, 62, etc. 5.2 Relative difference families When G = Zv and the order of the subgroup H is equal to w, a (G,H, k, 1)-RDF is clearly a (v, k, 1)-OOC whose leave is the subgroup of Zv of order w. In this case, some authors (e.g., [22]) speak of a w-regular (v, k, 1)-OOC. Note that a w-regular (v, k, 1)-OOC is optimal provided that w ≤ k(k − 1). Also, note that a k-regular (v, k, 1)-OOC gives rise to a cyclic S(2, k, v). Theorem 5.3. Let G be a group with a subgroup S of index 2 and let X be a (G,H, k, λ)- relative difference family of size n, where |H| = w. If H is contained in S, then kn− λw is a sum of n squares. If H is not contained in S, then kn is a sum of n squares. Proof. Let us say that an element of G is even or odd according to whether it belongs to or does not belong to S, respectively. Set X = {X1, . . . , Xn} and, for i = 1, . . . , n, let ai and bi be the number of even and odd elements in Xi, respectively. The number of odd elements in ∆Xi is 2aibi (note that here we are treating ∆Xi and ∆X as multisets since differences may be repeated). Also, by definition, the number of odd elements in ∆X is λ times the number of all odd elements of G \H . If H , S are subgroups of a group G with |G : S| = 2, then either H ⊆ S or |H ∩ S| = |H|/2. Hence, we have n∑ i=1 2aibi = λv 2 or λ(v − w) 2 , according to whether H is contained or not contained in S. Thus we have: n∑ i=1 4aibi = { λv if H ⊆ S λ(v − w) if H ̸⊆ S. Now, given that ai + bi = k, we have 4aibi = 4ai(k − ai) = k2 − (k − 2ai)2. Replacing this in the above formula and taking account of (1.1), we get n∑ i=1 (k − 2ai)2 = { kn− λw if H ⊆ S kn if H ̸⊆ S. and the assertion follows. 26 Ars Math. Contemp. 20 (2021) 1–27 Theorem 5.3 is trivial for n ≥ 4 in view of Theorem 1.9. On the other hand, it gives some important information for n = 1, 2, 3. We now discuss several consequences of Theorem 1.9. First, we point out a connection with the Bose-Connor Theorem (Theorem 3.3). Sup- pose we take n = 1 in Theorem 5.3 and suppose H ⊆ S. Recall that S is a subgroup of index 2. Denote |G| = v = uw, where |H| = w. Then Theorem 5.3 asserts that k − λw must be a perfect square. This result can also be obtained from Theorem 3.3, as follows. The development of the (G,H, k, λ)-relative difference family through the group G yields a divisible design with λ1 = 0 and λ2 = λ. Since H and S are subgroups of G and H ⊆ S, it must be the case that w | v2 , say v/2 = tw. Then u = v/w = 2t is even. Therefore statement 1. of Theorem 3.3 applies, and k2−λv is a square. However, k(k−1)−λ(v−w) from (1.1), so k2 − λv = k − λw, so we obtain the same result. In the special case of the preceding result where w = 1, we see that k − λ is a square. This also follows from the Bruck-Ryser-Chowla Theorem (as we already discussed in Ex- ample 3.5 in the case where G is cyclic). If we take n = 2 and w = 1, we see that, if X is a (v, k, λ)-DF with two base blocks in a group with a subgroup of index 2, then 2k − λ is a sum of two squares (this result was first shown in [17, Corollary 2.1]). Similarly, taking n = 3 and w = 1, we see that, if X is a (v, k, λ)-DF with three base blocks in a group with a subgroup of index 2, then 3k− λ is a sum of three squares (this result was first shown in [17, Corollary 2.2]). Finally, n ∈ {2, 3} and w = k ≡ 0 (mod 2), then a cyclic S(2, k, k(k − 1)n + k) exists only if k is a sum of n squares. This is equivalent to results obtained in Section 5.1. 6 Summary We have proven a number of nonexistence results for infinite classes of modular Golomb rulers, optical orthogonal codes, cyclic Steiner systems and relative difference families. We note that very few results of this nature were previously known. Many of our new results are based on counting even and odd differences and then applying some classical results from number theory which establish which integers can be expressed as a sum of a two or three squares. ORCID iDs Marco Buratti https://orcid.org/0000-0003-1140-2251 Douglas Robert Stinson https://orcid.org/0000-0001-5635-8122 References [1] R. J. R. Abel and M. Buratti, Some progress on (v, 4, 1) difference families and optical orthog- onal codes, J. Comb. Theory Ser. A 106 (2004), 59–75, doi:10.1016/j.jcta.2004.01.003. [2] C. M. Bird and A. D. Keedwell, Design and applications of optical orthogonal codes—a survey, Bull. Inst. Combin. Appl. 11 (1994), 21–44. [3] R. C. Bose, An affine analogue of Singer’s theorem, J. Indian Math. Soc. (N. S.) 6 (1942), 1–15, http://www.informaticsjournals.com/index.php/jims/article/ view/17165. [4] R. C. Bose and W. S. Connor, Combinatorial properties of group divisible incomplete block designs, Ann. Math. Statistics 23 (1952), 367–383, doi:10.1214/aoms/1177729382. M. Buratti and D. R. Stinson: New results on modular Golomb rulers, optical orthogonal . . . 27 [5] M. Buratti, Recursive constructions for difference matrices and relative difference families, J. Combin. Des. 6 (1998), 165–182, doi:10.1002/(sici)1520-6610(1998)6:3<165::aid-jcd1>3.0. co;2-d. [6] M. Buratti, Old and new designs via difference multisets and strong difference families, J. Combin. Des. 7 (1999), 406–425, doi:10.1002/(sici)1520-6610(1999)7:6<406::aid-jcd2>3.3. co;2-l. [7] M. Buratti and D. R. Stinson, On resolvable Golomb rulers, symmetric configurations and progressive dinner parties, J. Algebr. Comb. (2021), doi:10.1007/s10801-020-01001-x. [8] F. R. K. Chung, J. A. Salehi and V. K. Wei, Optical orthogonal codes: design, analysis, and applications, IEEE Trans. Inform. Theory 35 (1989), 595–604, doi:10.1109/18.30982. [9] C. J. Colbourn and J. H. Dinitz (eds.), Handbook of Combinatorial Designs, Discrete Math- ematics and its Applications (Boca Raton), Chapman & Hall/CRC, Boca Raton, Florida, 2nd edition, 2007. [10] A. A. Davydov, G. Faina, M. Giulietti, S. Marcugini and F. Pambianco, On constructions and parameters of symmetric configurations vk, Des. Codes Cryptogr. 80 (2016), 125–147, doi: 10.1007/s10623-015-0070-x. [11] A. Dimitromanolakis, Analysis of the Golomb ruler and the Sidon set problems, and determi- nation of large, near-optimal Golomb rulers, Master’s thesis, Department of Electronic and Computer Engineering, Technical University of Crete, 2002. [12] K. Drakakis, A review of the available construction methods for Golomb rulers, Adv. Math. Commun. 3 (2009), 235–250, doi:10.3934/amc.2009.3.235. [13] P. Dusart, Explicit estimates of some functions over primes, Ramanujan J. 45 (2018), 227–251, doi:10.1007/s11139-016-9839-4. [14] D. M. Gordon, The prime power conjecture is true for n < 2, 000, 000, Electron. J. Combin. 1 (1994), #R6, doi:10.37236/1186. [15] D. Jungnickel, On automorphism groups of divisible designs, Canadian J. Math. 34 (1982), 257–297, doi:10.4153/cjm-1982-018-x. [16] D. Jungnickel, Difference sets, in: J. H. Dinitz and D. R. Stinson (eds.), Contemporary De- sign Theory: A Collection of Surveys, Wiley, New York, Wiley-Interscience Series in Discrete Mathematics and Optimization, pp. 241–324, 1992. [17] L. Martínez, D. Ž. Ðoković and A. Vera-López, Existence question for difference families and construction of some new families, J. Combin. Des. 12 (2004), 256–270, doi:10.1002/jcd. 20006. [18] L. J. Mordell, Diophantine Equations, volume 30 of Pure and Applied Mathematics, Academic Press, London-New York, 1969. [19] J. Nagura, On the interval containing at least one prime number, Proc. Japan Acad. 28 (1952), 177–181, http://projecteuclid.org/euclid.pja/1195570997. [20] K. H. Rosen, Elementary Number Theory and its Applications, Pearson, 6th edition, 2011. [21] I. Z. Ruzsa, Solving a linear equation in a set of integers I, Acta Arith. 65 (1993), 259–282, doi:10.4064/aa-65-3-259-282. [22] J. Yin, Some combinatorial constructions for optical orthogonal codes, Discrete Math. 185 (1998), 201–219, doi:10.1016/s0012-365x(97)00172-6.