1. A method for choosing a sequence of bursts of an access pattern in a primary network of a cognitive wireless network comprising the primary network and a secondary network, wherein the access pattern comprises an alternation of listen periods and signaling transmission periods having various lengths; the method comprising computing a random integer X, and generating the sequence of bursts corresponding to the computed random integer X; wherein the computing the random integer X comprises: choosing a number p between 0 and 1 as a function of a desired collision rate and choosing an integer L chosen of order log k log N, where k is a given base and N is maximum users of the primary network, these parameters p and L being common to all devices in the primary network; computing the random integer X having a probability P, where P is a truncated geometric distribution of p; when X<k L , letting m 1 , m 2 ,. .. , m i ,. .. , m L be an integer sequence that is encoded by X in the given base k; m i being integers chosen between 0 and k−1; deriving a preamble sequence of the primary network from the integer sequence by taking BS(k−1−m i ), BS(k−1−m 2 ),. .. , BS(k−1−m L ) as the preamble sequence, where BS(u) is a binary k-sequence which encodes a number u, u being an integer between 0 and k−1, thereby an average energy cost of a successful data packet transmission is below a target threshold.