File:Mangoldtglyph.png
From specialfunctionswiki
Revision as of 05:44, 22 June 2016 by Tom (talk | contribs) (Category:Mangoldtglyph <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'] = 2.4,2.4 def isValid ( n ): if (n <=0):...)
Mangoldtglyph.png (186 × 192 pixels, file size: 3 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'] = 2.4,2.4 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,400,1) f=np.vectorize(mangoldt) y=f(x) x2=np.arange(-500,1000,0.1) def g(x): return 0 h=np.vectorize(g) y2=h(x2) fig, ax = plt.subplots() ax.spines['top'].set_color('none') ax.spines['left'].set_color('none') ax.spines['right'].set_color('none') plt.tick_params(axis='x', which='both', bottom='off', top='off', labelbottom='off') plt.tick_params(axis='y', which='both', left='off', right='off', labelleft='off') plt.scatter(x,y,linewidth=1,color='Black') plt.plot(x2,y2,linewidth=1,color='Black') plt.plot(y2,x2,linewidth=1,color='Black') plt.xlim(0,400) plt.ylim(-0.3,6) plt.savefig('mangoldtglyph.png',bbox_inches='tight',pad_inches=0.0)
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:44, 22 June 2016 | 186 × 192 (3 KB) | Tom (talk | contribs) | Category:Mangoldtglyph <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'] = 2.4,2.4 def isValid ( n ): if (n <=0):... |
- You cannot overwrite this file.
File usage
There are no pages that link to this file.