|
Size: 675
Comment:
|
Size: 900
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 5: | Line 5: |
| ################################################################################ # Wiki form worksheet: _scratch_ ################################################################################ |
|
| Line 16: | Line 18: |
{{{#!python sage: sage.server.notebook.worksheet.Cell.worksheet.im_class.files_html() Traceback (most recent call last): ... TypeError: unbound method files_html() must be called with Cell instance as first argument (got nothing instead)}}} {{{#!python sage: _scratch___plain__ Traceback (most recent call last): ... NameError: name '_scratch___plain__' is not defined}}} |
|
| Line 44: | Line 34: |
| sage: c=0 sage: for i in range(200): ... a = 2^i -1 ... if a.is_prime(): ... c += 1 ... print str(c)+': '+str(a) 1: 3 2: 7 3: 31 4: 127 5: 8191 6: 131071 7: 524287 8: 2147483647 9: 2305843009213693951 10: 618970019642690137449562111 11: 162259276829213363391578010288127 12: 170141183460469231731687303715884105727}}} {{{#!python sage: a.is_prime() True}}} {{{#!python |
Copy cells from wiki-form window in sage worksheet and paste directly into wiki edit.
# Wiki form worksheet: _scratch_
1 sage: a = 5
1 sage: c=0
2 sage: for i in range(200):
3 ... a = 2^i -1
4 ... if a.is_prime():
5 ... c += 1
6 ... print str(c)+': '+str(a)
7 1: 3
8 2: 7
9 3: 31
10 4: 127
11 5: 8191
12 6: 131071
13 7: 524287
14 8: 2147483647
15 9: 2305843009213693951
16 10: 618970019642690137449562111
17 11: 162259276829213363391578010288127
18 12: 170141183460469231731687303715884105727
