Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168744
Image: ubuntu2004
gcd(515,2005)
5
factor(2005)
5 * 401
[valuation(117,p) for p in prime_range(2,23)]
[0, 2, 0, 0, 0, 1, 0, 0]
next_prime(2005)
2011
d,u,v = xgcd(12,15)
[d,u,v]
[3, -1, 1]
[binomial(11,m) for m in range(12)]
[1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1]
2^111 mod 7
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_4.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Ml4xMTEgbW9kIDc="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpvjv0rE/___code___.py", line 3 _sage_const_2 **_sage_const_111 mod _sage_const_7 ^ SyntaxError: invalid syntax
x, y = var('x, y') solve([x+y==6, x-y==4], x, y)
[[x == 5, y == 1]]
divisors(28); sum(divisors(28)); 2*28
[1, 2, 4, 7, 14, 28] 56 56
n = 2005 for i in range(1000): n = 3*odd_part(n) + 1 print i if odd_part(n)==1: break
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_9.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("biA9IDIwMDUKZm9yIGkgaW4gcmFuZ2UoMTAwMCk6CiAgICAgbiA9IDMqb2RkX3BhcnQobikgKyAxCiAgICAgICBwcmludCBpCiAgICAgICBpZiBvZGRfcGFydChuKT09MToKICAgICAgICAgIGJyZWFr"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpPA48Nj/___code___.py", line 6 print i ^ IndentationError: unexpected indent