Ask Your Question

hee1's profile - activity

2021-01-20 19:50:25 +0200 received badge  Student (source)
2018-10-21 18:33:06 +0200 received badge  Famous Question (source)
2018-04-09 17:04:00 +0200 received badge  Notable Question (source)
2016-12-13 11:04:55 +0200 received badge  Popular Question (source)
2013-09-06 17:39:58 +0200 asked a question Plot with prime numbers

I am trying to create a visualization of how common it is for a number to be prime. I am fairly new with the program and was hoping to get some assistant with any veteran users. My code I wrote is:

def com_primes(k):
    prime_list = []
    for n in range(1,k+1):
        for m in range(1,n+1):
            if Integer(n)/Integer(n) & Integer(n)/1 in ZZ:
                if is_prime(m):
                    prime_list.append((n,m))
return point(prime_divisor_list)

but the code is obviously wrong. If anyone could help me, that would be much appreciated.