interplane.Get Omega
Read in your language

omega-rosetta

aien-dev/omega-rosetta

Brought by drakestapleton

branch main Branches Tags History

omega-rosetta / tasks / anti-primes / oracle.py

10 lines · 365 bytes Raw Blame History
1# Independent reference for "Anti-primes" (Python 3, standard library only).
2# expected.txt is this program's stdout; omc never produced it.
3out, best, n = [], 0, 0
4while len(out) < 20:
5 n += 1
6 k = sum(1 for d in range(1, n + 1) if n % d == 0)
7 if k > best:
8 best = k
9 out.append(n)
10print("first 20 anti-primes: " + " ".join(map(str, out)))