There are various classes of functions that generate prime numbers, some of them are evencapable of producing the nth prime number as is the case of the formula by Willans (1964) and Ruizand Sondow (2014). In this work a function a(n) based on the divisor function d(n) is offered as aproposal, which generates prime numbers. For the sequence defined as: a(n) = n · 2/(n−d(n)) with n>1, it is proved that a(n) produces only zeros and primes: a(n) = 0 if n is composite or a(n) = n if n is primeExisten diversas clases de funciones que generan números primos, algunas de ellas son capaces de producir al enésimo número primo; como es el caso de la fórmula de Willans (1964) y Ruiz y Sondow (2014). En el presente trabajo se ofrece como propuesta un...