On Wed, Oct 17, 2012 at 9:37 PM, Eric Kangas <[email protected]> wrote: > code: > > b = 11^2 > > a = b^2 > > pri = [int(is_prime(i)) for i in range(a)] > > j = [i for i in range(a)][b+1:a:b] > > k = [i for i in range(a)][(b*2)+1:a:b] > > j.insert(0,0) > > k.insert(0,b) > > m = [matrix(QQ,sqrt(a)/(b/sqrt(b)),pri[j[i]:k[i]]) for i in range(len(j)-1)] > > eval = [m[i].eigenvalues() for i in range(len(m))]
sage: eval[0] [0, 0, -2.689488289890632?, -1.629922151366316?, 0.9326384408005977?, 1.659378497883232?, 2.806129601401341?, -0.7002097052983131? - 0.1908799082669581?*I, -0.7002097052983131? + 0.1908799082669581?*I, 0.1608416558842022? - 0.4166325370716392?*I, 0.1608416558842022? + 0.4166325370716392?*I] sage: parent(eval[0][0]) Algebraic Field sage: [CC(x) for x in eval[0]] [0, 0, -2.68948828989063, -1.62992215136632, 0.932638440800598, 1.65937849788323, 2.80612960140134, -0.700209705298313 - 0.190879908266958*I, -0.700209705298313 + 0.190879908266958*I, 0.160841655884202 - 0.416632537071639*I, 0.160841655884202 + 0.416632537071639*I] sage: sum([plot(CC(x)) for x in eval[0]]) [pretty picture] > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/sage-support?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en.
