(princ "Emacs: ")
(princ emacs-version)
(princ "\n")
(princ "Org: ")
(princ (org-version))
Emacs: 26.0.50 Org: 9.0.5
print version()
SageMath version 8.0.beta2, Release Date: 2017-04-12
factor(factorial(10))
2^8 * 3^4 * 5^2 * 7
P = plot(sin(x), (0, 2*pi), figsize=[5, 4]); P
This example is from the document of the method plot
of a matrix object.
m = random_matrix(RDF, 50)
m.plot(figsize=5)
This example is from the document of the function implicit_plot3d
.
var('x,y,z')
T = RDF(golden_ratio)
p = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x))
r = 4.77
implicit_plot3d(p, (x, -r, r), (y, -r, r), (z, -r, r), plot_points=40).show(viewer='tachyon', figsize=5)
[(a, factor(2^a + 1)) for a in range(5)]
0 | 2 |
1 | 3 |
2 | 5 |
3 | 3^2 |
4 | 17 |
colnames = ("a", "Smallest prime greater than 2^a")
[colnames] + [(a, next_prime(2^a)) for a in range(50, 55)]
a | Smallest prime greater than 2^a |
---|---|
50 | 1125899906842679 |
51 | 2251799813685269 |
52 | 4503599627370517 |
53 | 9007199254740997 |
54 | 18014398509482143 |
You can also pass the header argument :colnames
(an elisp) list to specify the column names.
[(a, next_prime(2^a)) for a in range(100, 105)]
a | Smallest prime greater than 2^a |
---|---|
100 | 1267650600228229401496703205653 |
101 | 2535301200456458802993406410833 |
102 | 5070602400912917605986812821771 |
103 | 10141204801825835211973625643089 |
104 | 20282409603651670423947251286127 |
E = EllipticCurve(u'389a'); E
Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field
print "Rank", E.rank()
E.integral_points()
Rank 2 [(-2 : 0 : 1), (-1 : 1 : 1), (0 : 0 : 1), (1 : 0 : 1), (3 : 5 : 1), (4 : 8 : 1), (6 : 15 : 1), (39 : 246 : 1), (133 : 1539 : 1), (188 : 2584 : 1)]
E.plot(figsize=5)