File:Greatestprimefactor,to1000.png

From specialfunctionswiki
Jump to: navigation, search
Original file(898 × 885 pixels, file size: 40 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 gpf(n):
        i = 2
        while i * i <= n:
                if n % i:
                        i += 1
                else:
                        n //= i
        return n

x=np.arange(0,1000,1);
f=np.vectorize(gpf)
y=f(x)

fig, ax = plt.subplots()

plt.xlabel(r'$n$')
plt.ylabel(r'$\mathrm{gpf}(n)$')

plt.scatter(x,y,linewidth=0.01,color='Black')
plt.xlim(0,1000)
plt.ylim(0,1000)
plt.savefig('greatestprimefactor,to1000.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/TimeThumbnailDimensionsUserComment
current05:19, 22 June 2016Thumbnail for version as of 05:19, 22 June 2016898 × 885 (40 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 gpf(n): i = 2 while i * i <= n:...
  • You cannot overwrite this file.

The following page links to this file:

Metadata