|
Size: 68
Comment:
|
Size: 900
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| Describe dmr/notebookwiki here. {{{ code code |
Copy cells from wiki-form window in sage worksheet and paste directly into wiki edit. |
| Line 9: | Line 4: |
| /// | ################################################################################ # Wiki form worksheet: _scratch_ ################################################################################ {{{#!python sage: a = 5 |
| Line 11: | Line 14: |
{{{#!python sage: a 5}}} {{{#!python sage: for i in range(10): ... print i*i - 2 -2 -1 2 7 14 23 34 47 62 79}}} {{{#!python 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
