Advertisement
Glenpl

Untitled

Sep 27th, 2015
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. import math
  2. def is_prime(n):
  3.     if n == 0 or n == 1:
  4.         return False
  5.     if n == 2:
  6.         return True
  7.     if n % 2 == 0 and n > 2:
  8.         return False
  9.     for i in range(3, int(math.sqrt(n)) + 1, 2):
  10.         if n % i == 0:
  11.             return False
  12.     return True
  13.  
  14. for i in range(0, 1000):
  15.     if is_prime( ((i ** 4) + 4) / 17 ):
  16.         print i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement