A perfect difference set is a set of residues (mod
) such that every nonzero residue can be uniquely expressed in the form
. Examples include
(mod 7) and
(mod 13). A necessary
condition for such a cyclic perfect difference set to exist is that
be of the form
. A sufficient
condition is that
be a prime power. Perfect
sets can be used in the construction of Golomb rulers.
The same name is used for an infinite set of positive
integers such that every nonzero integer
has exactly one representation
with
. This is an integer-difference
condition, with no reduction modulo
. Lev (2004) gives a greedy construction
whose increasing enumeration satisfies
, and even a set
partition of the positive integers into countably
many such sets. The set partition can be chosen
so that
for all positive
. For every integer perfect
difference set, its counting function satisfies
, while the greedy construction gives
(Lev 2004). Here
denotes big-O notation.