Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,22 @@
using System;
using System.Linq;
using System.Collections.Generic;
public static class Program
{
public static void Main() =>
Console.WriteLine(string.Join(" ", FindAntiPrimes().Take(20)));
static IEnumerable<int> FindAntiPrimes() {
int max = 0;
for (int i = 1; ; i++) {
int divisors = CountDivisors(i);
if (divisors > max) {
max = divisors;
yield return i;
}
}
int CountDivisors(int n) => Enumerable.Range(1, n / 2).Count(i => n % i == 0) + 1;
}
}