2026-07-072026-07-07http://salesiana.dossiersoluciones.com/handle/123456789/170690In this paper we propose an algorithm that correctly discards a set of numbers (from a previously defined sieve) with an interval of integers. Leopoldo's Theorem states that the remaining integer numbers will generate and count the complete list of primes of absolute value greater than 3 in the interval of interest. This algorithm avoids the problem of generating large lists of numbers, and can be used to compute (even in parallel) the prime counting function $π(h)$.11 pages, 2 figures, 5 tables; added references, added historical context, corrected typosGeneral Mathematics11Y11; 11N35; 11N36; 11Y55An algorithmic implementation of the Pi function based on a new sievetext