File:Totientplot,to3500.png
From specialfunctionswiki
Revision as of 04:19, 22 June 2016 by Tom (talk | contribs) (Tom moved page File:Totientplot.png to File:Totientplot,to3500.png)
Size of this preview: 609 × 600 pixels. Other resolutions: 244 × 240 pixels | 899 × 885 pixels.
Original file (899 × 885 pixels, file size: 80 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 totient(n): amount = 0 for k in range(1, n + 1): if fractions.gcd(n, k) == 1: amount += 1 return amount x=np.arange(0,3500,1); f=np.vectorize(totient) y=f(x) fig, ax = plt.subplots() plt.xlabel(r'$n$') plt.ylabel(r'$\phi(n)$') plt.scatter(x,y,linewidth=0.01,color='Black') plt.xlim(0,3500) plt.ylim(0,3500) plt.savefig('totientplot.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 | 04:15, 22 June 2016 | 899 × 885 (80 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 totient(n): amount = 0 for k in range... |
- You cannot overwrite this file.
File usage
The following 3 pages link to this file:
- Euler totient
- File:Totientplot.png (file redirect)
- File:Totientplot.png (file redirect)