Abstract : With increasing demand of new wireless applications and increasing number of wireless user’s, problem of spectrum scarcity arises. In this context, cognitive radio supports dynamic spectrum access to address spectrum scarcity problem. Cognitive radio defined the cognitive radio nodes by their ability to intelligently adapt the environment to achieve specific objectives through advanced techniques. The variance of channel availability for cognitive radio nodes degrades connectivity and robustness of this type of network; in this case the use of clustering is an effective approach to meet this challenge. Indeed, the geographical areas are homogeneous in terms of type of radio spectrum, radio resources are better allocated by grouping cognitive radio nodes per cluster. Clustering is interesting to effectively manage the spectrum or routing in cognitive radio ad hoc networks. In this paper, we aim to improve connectivity and cooperativeness of cognitive radio nodes based on the improvement of the k-means algorithm. Our proposed algorithm is applied in cognitive radio ad hoc networks. The obtained results in terms of exchange messages and execution time show the feasibility of our algorithm to form clusters in order to improve connectivity and cooperativeness of cognitive radio nodes in the context of cognitive radio ad hoc networks.