Skip to main content
added 8 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Python 3, 6767 62 bytes

deff=lambda f(n),k=1,m=1:k=m=1;exec('m%k*n%kk*k<n and print(km%k*n%k>0);m*=k*k;k+=1;'*int*[k]+f(n**.5)n,k+1,m*k*k)or[] 

Try it online!Try it online!

Python 3, 67 bytes

def f(n):k=m=1;exec('m%k*n%k and print(k);m*=k*k;k+=1;'*int(n**.5)) 

Try it online!

Python 3, 67 62 bytes

f=lambda n,k=1,m=1:k*k<n and(m%k*n%k>0)*[k]+f(n,k+1,m*k*k)or[] 

Try it online!

Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Python 3, 67 bytes

def f(n):k=m=1;exec('m%k*n%k and print(k);m*=k*k;k+=1;'*int(n**.5)) 

Try it online!