File:Mangoldtplot.png
From specialfunctionswiki
Revision as of 05:57, 22 June 2016 by Tom (talk | contribs) (Category:Plot <pre>#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt import fractions from mpmath import * from pylab import rcParams rcParams['figure.figsize'] = 10, 10 def isValid ( n ): if (n <=0): ret...)
Size of this preview: 594 × 599 pixels. Other resolutions: 238 × 240 pixels | 868 × 876 pixels.
Original file (868 × 876 pixels, file size: 25 KB, MIME type: image/png)
#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt import fractions from mpmath import * from pylab import rcParams rcParams['figure.figsize'] = 10, 10 def isValid ( n ): if (n <=0): return 0 elif (n - int ( n ) != 0): return 0 return 1 def isPrimePower (n , d ): return ( math . log (n , d ) - int ( math . log (n , d ))==0) def Mangoldt ( n ): if not isValid ( n ): return 0 d = 2 while (d <= n ): # Find a divisor if ( n % d ==0): # Check if n is d to some power if ( isPrimePower (n , d )): return log ( d ) else : # If not , it must be a product # of different divisors . return 0 d += 1 return 0 x=np.arange(0,3000,1); f=np.vectorize(mangoldt) y=f(x) fig, ax = plt.subplots() plt.xlabel(r'$n$') plt.ylabel(r'$\Lambda(n)$') plt.scatter(x,y,linewidth=0.01,color='Black') plt.xlim(0,3000) plt.ylim(-0.3,8.5) plt.savefig('mangoldtplot.png',bbox_inches='tight',pad_inches=0.15)
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 05:57, 22 June 2016 | 868 × 876 (25 KB) | Tom (talk | contribs) | Category:Plot <pre>#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt import fractions from mpmath import * from pylab import rcParams rcParams['figure.figsize'] = 10, 10 def isValid ( n ): if (n <=0): ret... |
- You cannot overwrite this file.
File usage
The following page links to this file: