File:Numeri Coprimi.svg

Summary

Description
Italiano: Grafico di tutte le coppie (x,y) per cui (x ed y sono coprimi) Realizzato con Python e MatPlotLib.
Date
Source Own work
Author Gabry
SVG development
InfoField

Source code

The logo of Matplotlib – comprehensive library for creating static, animated, and interactive visualizations in Python
The logo of Matplotlib – comprehensive library for creating static, animated, and interactive visualizations in Python
This media was created with Matplotlib (comprehensive library for creating static, animated, and interactive visualizations in Python)Category:Images with Matplotlib source code
Here is a listing of the source used to create this file.

Deutsch  English  +/−

#!/usr/bin/python
from pylab import *

def gcd(a,b):
    r = a%b
    while r!=0:
        a,b,r = b,r,b%r
    return b

def Coprime(x,y):
    return gcd(x,y)==1

X,Y = [],[]
for i in range(1,51):
    for j in range(1,51):
        if Coprime(i,j):
            X.append(i)
            Y.append(j)
plot(X,Y,'b.')
show()

Licensing

Gabry, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Attribution:
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-3.0#Numeri%20Coprimi.svgCategory:Self-published work
Category:Number theory
Category:CC-BY-SA-3.0 Category:Images with Matplotlib source code Category:Number theory Category:Self-published work Category:Valid SVG created with Matplotlib