Created
September 24, 2019 03:11
-
-
Save kevinywlui/3b6b0941eb14991b35e6b871478ef1ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sage.all import * | |
def is_good(N): | |
number_of_opt_curves = 0 | |
for d in divisors(N): | |
number_of_opt_curves += number_of_divisors(N//d) * len(list(cremona_optimal_curves(d))) | |
dim = dimension_cusp_forms(N) | |
return number_of_opt_curves == dim | |
good_primes = [2, 3, 5, 7, 11, 13, 17, 19, 37] | |
to_be_checked = {1} | |
good = set() | |
while to_be_checked: | |
new_goods = set() | |
for x in to_be_checked: | |
# add the children to to_be_checked if good | |
if is_good(x): | |
good.add(x) | |
new_goods = new_goods.union({x*p for p in good_primes}) | |
# now check the new_goods | |
to_be_checked = new_goods | |
list_of_goods = list(sorted(good)) | |
print('There are {} good integers and they are:'.format(len(list_of_goods))) | |
print(list_of_goods) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment