Difference between revisions of "File:Totientplot,to3500.png"
From specialfunctionswiki
(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...) |
m (Tom moved page File:Totientplot.png to File:Totientplot,to3500.png) |
(No difference)
|
Revision as of 04:19, 22 June 2016
#!/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)