Golomb Rulers and Fibonacci Sequences

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

A generalized Fibonacci sequence is defined by . A maximal generalized Fibonacci sequence mod is a generalized Fibonacci sequence with smallest period equal to length .


For example, with , , (or equivalently with prime 5 and pair ), the sequence starts of length 24 and then repeats. From that initial subsequence, construct the 24 overlapping coordinates: ; apart from , they are a permutation of the coordinates for a 5×5 table with rows and columns both indexed by 0 to 4. Since there are no smaller periods, all coordinates except are represented. Place the numbers at those coordinates and leave in the upper left blank.

A Golomb ruler is a set of marks at integer positions along a line, such that no two pairs of marks are the same distance apart. Selecting any row or column other than the first (with index 0) gives marks for a nonoptimal Golomb ruler of length that wraps around (i.e. the first and last marks are also subtracted). No distance between marks is repeated.

In the example under discussion, the second column (with index 1) is , which are the marks. The differences are . The negative differences mod 24 are . No values repeat; the missing values are .


Contributed by: Ed Pegg Jr (July 2016)
Open content licensed under CC BY-NC-SA




[1] T. Rokicki and G. Dogon, "Possibly Optimal Golomb Rulers Calculated for 160 to 40,000 Marks," (Jul 7, 2016) cube20.org/golomb.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.