title: Prime number hard drive storage for very large primes - Sieve of Atkin
body: <p>I have implemented the <a href="https://stackoverflow.com/questions/21783160/sieve-of-atkin-implementation-in-python">Sieve of Atkin</a> and it works great up to primes nearing 100,000,000 or so. Beyond that, it breaks down because of memory problems.</p>
  
  <p>In the algorithm, I want to replace the memory based array with a hard drive based array. Python's "wb" file functions and Seek functions may do the trick. Before I go off inventing new wheels, can anyone offer advice? Two issues appear at the outset: </p>
  
  <ol>
  <li>Is there a way to "chunk" the Sieve of Atkin to work on segment in memory, and</li>
  <li>is there a way to suspend the activity and come back to it later - suggesting I could serialize the memory variables and restore them.</li>
  </ol>
  
  <p>Why am I doing this? An old geezer looking for entertainment and to keep the noodle working.</p>