This document presents a novel centralized clustering algorithm that combines genetic algorithms and improved k-means (GA-IKM) to optimize energy consumption in Internet of Things (IoT) networks. It addresses the challenges of limited power supply in IoT devices, proposing methods for selecting cluster heads and calculating the number of clusters to extend network lifetime. Simulation results indicate that this approach outperforms existing methods like LEACH, k-means, and OK-means in terms of energy efficiency and network longevity.