Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is my custom function to get list of relative primes

def getRelativePrimeList(n):
    L = [];
    for i in range(1,n):
        if gcd(i,n)==1:
            L.append(i);
    return L;