| Size: 45946 Comment:  | Size: 48454 Comment:  | 
| Deletions are marked like this. | Additions are marked like this. | 
| Line 872: | Line 872: | 
| = Multiple Zeta Values = | = Multiple Zeta Values or Euler-Zagier numbers = | 
| Line 874: | Line 874: | 
| == Word to composition == {{{#!sagecell @interact def _( weight=(7,(2..30))): n=weight a=[0 for i in range(n-1)] a.append(1) @interact def _(v=('word', input_grid(1, n, default=[a], to_value=lambda x: vector(flatten(x))))): a=[v[i] for i in range(len(v))] def bintocomp(a): b=[] count=1 for j in range(len(a)): if(a[j]==0): count=count+1 else: b.append(count) count=1 return(b) print "Composition is ",bintocomp(a) }}} {{attachment:akhi2.png}} == Composition to Word == {{{#!sagecell @interact def _( Depth=(7,(1..30))): n=Depth a=[] a.append(2) a=a+[1 for i in range(1,n)] @interact def _(v=('composition', input_grid(1, n, default=[a], to_value=lambda x: vector(flatten(x))))): a=[v[i] for i in range(len(v))] def comptobin(a): word=[] for i in range(len(a)): word=word+[0]*(a[i]-1)+[1] return(word) print "Word is ",comptobin(a) }}} {{attachment:akhi3.png}} == Dual of a Word == {{{#!sagecell @interact def _( weight=(7,(2..30))): n=weight a=[0 for i in range(n-1)] a.append(1) @interact def _(v=('word', input_grid(1, n, default=[a], to_value=lambda x: vector(flatten(x))))): a=[v[i] for i in range(len(v))] def dual(a): b=list() b=a b=b[::-1] for i in range(len(b)): b[i]=1-b[i] return(b) print "Dual word is ",dual(a) }}} {{attachment:akhi4.png}} == Computing Multiple Zeta values == | == Computing Multiple Zeta values (Euler-Zagier numbers) == | 
| Line 948: | Line 879: | 
| def _( weight=(5,(2..20))): | def _( weight=(5,(2..100))): | 
| Line 1001: | Line 932: | 
| print zeta(a) | u=zeta(a) RIF=RealIntervalField(int(3.321928*D)) u=u/1 print u | 
| Line 1008: | Line 942: | 
| def _( Depth=(5,(2..20))): | def _( Depth=(5,(2..100))): | 
| Line 1067: | Line 1001: | 
| print zeta(a) | u=zeta(a) RIF=RealIntervalField(int(3.321928*D)) u=u/1 print u | 
| Line 1071: | Line 1007: | 
| == Program to Compute Integer Relation between Multiple Zeta Values (Euler-Zagier numbers) == {{{#!sagecell from mpmath import * print "Enter the number of composition" @interact def _( n=(5,(2..100))): a=[] for i in range(n): a.append([i+2,1]) print "In each box Enter composition as an array" @interact def _(v=('Compositions', input_box( default=a, to_value=lambda x: vector(flatten(x)))), accuracy=(100..100000)): D=accuracy R=RealField(10) a=v def comptobin(a): word=[] for i in range(len(a)): word=word+[0]*(a[i]-1)+[1] return(word) DD=int(D)+int(R(log(3.321928*D))/R(log(10)))+4 RIF=RealIntervalField(DD) mp.dps=DD def Li(word): n=int(DD*log(10)/log(2))+1 B=[] L=[] S=[] count=-1 k=len(word) for i in range(k): B.append(mpf('0')) L.append(mpf('0')) if(word[i]==1 and i<k-1): S.append(mpf('0')) count=count+1 T=mpf('1') for m in range(n): T=T/2 B[k-1]=mpf('1')/(m+1) j=count for i in range(k-2,-1,-1): if(word[i]==0): B[i]=B[i+1]/(m+1) elif(word[i]==1): B[i]=S[j]/(m+1) S[j]=S[j]+B[i+1] j=j-1 L[i]=T*B[i]+L[i] L[k-1]=T*B[k-1]+L[k-1] return(L) def dual(a): b=list() b=a b=b[::-1] for i in range(len(b)): b[i]=1-b[i] return(b) def zeta(a): b=dual(a) l1=Li(a)+[1] l2=Li(b)+[1] Z=mpf('0') for i in range(len(l1)): Z=Z+l1[i]*l2[len(a)-i] return(Z) zet=[] for i in range(n): zet.append((zeta(comptobin(a[i])))) mp.dps=D for i in range(n): zet[i]=zet[i]/1 print "zeta(",a[i],")=",zet[i] u=pslq(zet,tol=10**-D,maxcoeff=100,maxsteps=10000) print "the Intger Relation between the above zeta values given by the vector" print u }}} {{attachment:akhi10.png}} == Word to composition == {{{#!sagecell @interact def _( weight=(7,(2..100))): n=weight a=[0 for i in range(n-1)] a.append(1) @interact def _(v=('word', input_grid(1, n, default=[a], to_value=lambda x: vector(flatten(x))))): a=[v[i] for i in range(len(v))] def bintocomp(a): b=[] count=1 for j in range(len(a)): if(a[j]==0): count=count+1 else: b.append(count) count=1 return(b) print "Composition is ",bintocomp(a) }}} {{attachment:akhi2.png}} == Composition to Word == {{{#!sagecell @interact def _( Depth=(7,(1..100))): n=Depth a=[] a.append(2) a=a+[1 for i in range(1,n)] @interact def _(v=('composition', input_grid(1, n, default=[a], to_value=lambda x: vector(flatten(x))))): a=[v[i] for i in range(len(v))] def comptobin(a): word=[] for i in range(len(a)): word=word+[0]*(a[i]-1)+[1] return(word) print "Word is ",comptobin(a) }}} {{attachment:akhi3.png}} == Dual of a Word == {{{#!sagecell @interact def _( weight=(7,(2..100))): n=weight a=[0 for i in range(n-1)] a.append(1) @interact def _(v=('word', input_grid(1, n, default=[a], to_value=lambda x: vector(flatten(x))))): a=[v[i] for i in range(len(v))] def dual(a): b=list() b=a b=b[::-1] for i in range(len(b)): b[i]=1-b[i] return(b) print "Dual word is ",dual(a) }}} {{attachment:akhi4.png}} | |
| Line 1074: | Line 1157: | 
| def _( w1=(2,(2..20)), w2=(2,(2..20))): | def _( w1=(2,(2..100)), w2=(2,(2..100))): | 
| Line 1161: | Line 1244: | 
| def _( w=(2,(2..20))): | def _( w=(2,(2..100))): | 
| Line 1454: | Line 1537: | 
| c=Regshuf0(a) | c=Regshuf1(a) | 
Contents
- Integer Factorization
- Prime Numbers
- Modular Forms
- Modular Arithmetic
- Cyclotomic Fields
- Elliptic Curves
- Cryptography
- Other
- Multiple Zeta Values or Euler-Zagier numbers
Integer Factorization
Divisibility Poset
by William Stein
 
 
Factor Trees
by William Stein
 
 
More complicated demonstration using Mathematica: http://demonstrations.wolfram.com/FactorTrees/
Factoring an Integer
by Timothy Clemans
Sage implementation of the Mathematica demonstration of the same name. http://demonstrations.wolfram.com/FactoringAnInteger/
Prime Numbers
Illustrating the prime number theorem
by William Stein
 
 
Prime Spiral - Square FIXME
by David Runde
 
Prime Spiral - Polar
by David Runde
 
Modular Forms
Computing modular forms
by William Stein
 
 
Computing the cuspidal subgroup
by William Stein
 
 
A Charpoly and Hecke Operator Graph
by William Stein
 
 
Modular Arithmetic
Quadratic Residue Table FIXME
by Emily Kirkman
 
 
 
 
Cubic Residue Table FIXME
by Emily Kirkman
 
 
Cyclotomic Fields
Gauss and Jacobi Sums in Complex Plane
by Emily Kirkman
 
 
Exhaustive Jacobi Plotter
by Emily Kirkman
 
 
Elliptic Curves
Adding points on an elliptic curve
by David Møller Hansen
 
 
Plotting an elliptic curve over a finite field
 
 
Cryptography
The Diffie-Hellman Key Exchange Protocol
by Timothy Clemans and William Stein
 
 
Other
Continued Fraction Plotter
by William Stein
 
 
Computing Generalized Bernoulli Numbers
by William Stein (Sage-2.10.3)
 
 
Fundamental Domains of SL_2(ZZ)
by Robert Miller
 
 
Multiple Zeta Values or Euler-Zagier numbers
by Akhilesh P.
Computing Multiple Zeta values (Euler-Zagier numbers)
Word Input
 
 
Composition Input
 
 
Program to Compute Integer Relation between Multiple Zeta Values (Euler-Zagier numbers)
 
 
Word to composition
 
 
Composition to Word
 
 
Dual of a Word
 
 
Shuffle product of two Words
 
 
Shuffle Regularization at 0
 
 
Shuffle Regularization at 1
 
 
