fork download
  1. p = []
  2. for i in range (2, 10 ** 4):
  3. ok = True
  4. for c in p:
  5. if i % c == 0:
  6. ok = False
  7. break
  8. if ok:
  9. p += [i]
  10. print len (p)
  11.  
  12. for n in range (2 ** 64 + 1, 2 ** 64 + 10 ** 5):
  13. if n % (2 ** 8) == 0:
  14. print 'n = %d, still searching...' % n
  15. m = n
  16. for q in p:
  17. while m % q == 0:
  18. m /= q
  19. if m == 1:
  20. print n
  21. print n - 2 ** 64
  22. break
  23.  
Success #stdin #stdout 0.49s 9056KB
stdin
Standard input is empty
stdout
1229
n = 18446744073709551872, still searching...
18446744073709552034
418