Ejemplo n.º 1
0
        private IEnumerable<long> GetHammingPrimes(IEnumerable<long> hammingNumbers)
        {
            var primeUtils = new Prime((long)Math.Ceiling(Math.Sqrt(Limit)) + 100);

            foreach (var hammingNumber in hammingNumbers)
            {
                if (primeUtils.IsPrimeCompute(hammingNumber + 1) && hammingNumber < Limit && hammingNumber > 5)
                {
                    yield return hammingNumber + 1;
                }
            }
        }