Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168822
Image: ubuntu2004
print "Modular form space dimensions" print "N = row, k = col" print print "\t", lok = 1 hik = 16 Nbound = 23 for k in range(lok, hik): print "#" + repr(k), "\t", print for N in range(1, Nbound): print "#" + repr(N), "\t", for k in range(lok, hik): print ModularForms(Gamma0(N), k).dimension(), "\t", print
Modular form space dimensions N = row, k = col #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #1 0 0 0 1 0 1 0 1 0 1 0 2 0 1 0 #2 0 1 0 2 0 2 0 3 0 3 0 4 0 4 0 #3 0 1 0 2 0 3 0 3 0 4 0 5 0 5 0 #4 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 #5 0 1 0 3 0 3 0 5 0 5 0 7 0 7 0 #6 0 3 0 5 0 7 0 9 0 11 0 13 0 15 0 #7 0 1 0 3 0 5 0 5 0 7 0 9 0 9 0 #8 0 3 0 5 0 7 0 9 0 11 0 13 0 15 0 #9 0 3 0 5 0 7 0 9 0 11 0 13 0 15 0 #10 0 3 0 7 0 9 0 13 0 15 0 19 0 21 0 #11 0 2 0 4 0 6 0 8 0 10 0 12 0 14 0 #12 0 5 0 9 0 13 0 17 0 21 0 25 0 29 0 #13 0 1 0 5 0 7 0 9 0 11 0 15 0 15 0 #14 0 4 0 8 0 12 0 16 0 20 0 24 0 28 0 #15 0 4 0 8 0 12 0 16 0 20 0 24 0 28 0 #16 0 5 0 9 0 13 0 17 0 21 0 25 0 29 0 #17 0 2 0 6 0 8 0 12 0 14 0 18 0 20 0 #18 0 7 0 13 0 19 0 25 0 31 0 37 0 43 0 #19 0 2 0 6 0 10 0 12 0 16 0 20 0 22 0 #20 0 6 0 12 0 18 0 24 0 30 0 36 0 42 0 #21 0 4 0 10 0 16 0 20 0 26 0 32 0 36 0 #22 0 5 0 11 0 17 0 23 0 29 0 35 0 41 0
print "Cusp form space dimensions" print "N = row, k = col" print print "\t", kbound = 16 Nbound = 23 for k in range(1, kbound): print "#" + repr(k), "\t", print for N in range(1, Nbound): print "#" + repr(N), "\t", for k in range(1, kbound): print CuspForms(Gamma0(N), k).dimension(), "\t", print
Cusp form space dimensions N = row, k = col #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 #2 0 0 0 0 0 0 0 1 0 1 0 2 0 2 0 #3 0 0 0 0 0 1 0 1 0 2 0 3 0 3 0 #4 0 0 0 0 0 1 0 2 0 3 0 4 0 5 0 #5 0 0 0 1 0 1 0 3 0 3 0 5 0 5 0 #6 0 0 0 1 0 3 0 5 0 7 0 9 0 11 0 #7 0 0 0 1 0 3 0 3 0 5 0 7 0 7 0 #8 0 0 0 1 0 3 0 5 0 7 0 9 0 11 0 #9 0 0 0 1 0 3 0 5 0 7 0 9 0 11 0 #10 0 0 0 3 0 5 0 9 0 11 0 15 0 17 0 #11 0 1 0 2 0 4 0 6 0 8 0 10 0 12 0 #12 0 0 0 3 0 7 0 11 0 15 0 19 0 23 0 #13 0 0 0 3 0 5 0 7 0 9 0 13 0 13 0 #14 0 1 0 4 0 8 0 12 0 16 0 20 0 24 0 #15 0 1 0 4 0 8 0 12 0 16 0 20 0 24 0 #16 0 0 0 3 0 7 0 11 0 15 0 19 0 23 0 #17 0 1 0 4 0 6 0 10 0 12 0 16 0 18 0 #18 0 0 0 5 0 11 0 17 0 23 0 29 0 35 0 #19 0 1 0 4 0 8 0 10 0 14 0 18 0 20 0 #20 0 1 0 6 0 12 0 18 0 24 0 30 0 36 0 #21 0 1 0 6 0 12 0 16 0 22 0 28 0 32 0 #22 0 2 0 7 0 13 0 19 0 25 0 31 0 37 0
S2_11 = CuspForms(Gamma1(11), 3) tlist = S2_11.basis() t = tlist[0] N = 200 q = t.q_expansion(N) prev = 0 for i in range(10): current = randint(1, N) print "current =", current while current < N and prev != current: prev = current current = abs(q[current]) print current
current = 58 680 current = 89 4910 current = 3 0 0 current = 183 394 current = 26 330 current = 77 3382 current = 147 583 current = 118 1691 current = 76 575 current = 28 1120
# Helper method to obtain basis object for cusp space (see below) def getBasis(N, gammaType): if gammaType == 0: S = CuspForms(Gamma0(N), 2) elif gammaType == 1: S = CuspForms(Gamma1(N), 2) else: S = CuspForms(Gamma(N), 2) return S.basis() # Amicable pair search among weight 2 normalized basis cusp forms for fixed level. # Returns two-dim list: rows correspond to basis forms of cusp space; cols to amicable pairs for each form. def pairSearch(N, gammaType, depth): # N = level # gammaType = Gamma0 if 0, Gamma1 if 1, Gamma otherwise # depth = how deep to look into coeffs (go up to (depth - 1)th index) basis = getBasis(N, gammaType) list = [] for t in range(len(basis)): list.append([]) # append a new sublist for each basis form q = basis[t].q_expansion(depth) for i in range(1, depth): for j in range(i, depth): if abs(q[i]) == j and abs(q[j]) == i: list[t].append((i, j)) return list # Search for fixed coeff value among weight 2 normalized basis cusp forms for fixed level. # Returns two-dim list: rows correspond to basis forms of cusp space; cols to indices of coeffs equal to the input value. def valueSearch(N, gammaType, value, depth): # N = level # gammaType = Gamma0 if 0, Gamma1 if 1, Gamma otherwise # depth = how deep to look into coeffs (go up to (depth - 1)th index) basis = getBasis(N, gammaType) list = [] for t in range(len(basis)): list.append([]) # append a new sublist for each basis form q = basis[t].q_expansion(depth) for i in range(1, depth): if abs(q[i]) == value: list[t].append(i) return list
depth = 1000 for N in range(11, 20): print pairSearch(N, 0, depth)
[[(1, 1), (2, 2)]] [] [] [[(1, 1)]] [[(1, 1)]] [] [[(1, 1)]] [] [[(1, 1)]]
E = EllipticCurve([0, -1, 0, 0, 1/4]) E.has_cm()
False
print pairSearch(11, 0, 20000)
[[(1, 1), (2, 2)]]
for N in range(11, 40): print N, "\t", list = valueSearch(N, 0, 1, 1000) for t in range(len(list)): print len(list[t]), print
11 23 12 13 14 38 15 57 16 17 16 18 19 15 20 8 21 64 22 23 19 23 26 23 24 11 25 26 53 51 27 6 28 7 31 29 58 49 30 39 47 41 31 33 31 32 2 33 25 78 15 34 5 14 40 35 37 69 33 36 1 37 13 36 38 32 13 47 51 39 84 28 82
depth = 4000 S = CuspForms(Gamma0(11), 2) basis = S.basis() q = basis[0].q_expansion(depth) list0 = [] list1 = [] list2 = [] count0 = 0 count1 = 0 count2 = 0 for i in range(1, depth): absCoeff = abs(q[i]) if absCoeff == 0: count0 += 1 list0.append((i, count0)) elif absCoeff == 1: count1 += 1 list1.append((i, count1)) elif absCoeff == 2: count2 += 1 list2.append((i, count2)) points0 = point2d(list0) points1 = point2d(list1, rgbcolor = (1, 0, 0)) points2 = point2d(list2, rgbcolor = (0, 1, 0)) show(points0 + points1 + points2)
depth = 4000 M = 7.0 list = [] count = [] for value in range(0, M): list.append([]) count.append(0) S = CuspForms(Gamma0(11), 2) basis = S.basis() q = basis[0].q_expansion(depth) for i in range(1, depth): absCoeff = abs(q[i]) if absCoeff < M: count[absCoeff] += 1 list[absCoeff].append((i, count[absCoeff])) points = [] for value in range(0, M): points.append(point2d(list[value], rgbcolor = (value / M, 0, 0))) show(points[0] + points[1] + points[2] + points[3] + points[4] + points[5] + points[6])