The personal website of Scott W Harden
Source code for Prime Failure 1 Year in the Making
title: Prime Failure 1 Year in the Making
date: 2010-08-11 07:49:58
  - python
  - old

# Prime Failure 1 Year in the Making

__My expression is completely flat right now.__ I simply cannot believe I'm about to say what I'm preparing to say. I spent nearly a year cracking large prime numbers. In short, I took-on a project I called [_The Flowering N'th Prime Project_](, where I used my [SheevaPlug]( to generate a list of every \[every millionth\] prime number. The current "golden standard" is [this page]( where one can look-up the N'th prime up to 1 trillion. My goal was to reach over 1 trillion, which I did just this morning! I was planning on being the only source on the web to allow lookups of prime numbers greater than 1 trillion.

<div class='center border'>



__However, when I went to look at the logs,__ I realized that the software had a small, fatal bug in it. Apparently every time the program restarted (which happened a few times over the months), although it resumed at its most recent prime number, it erased the previous entries. As a result, I have no logs below N=95 billion. In other words, although I reached my target this morning, it's completely irrelevant since I don't have all the previous data to prove it. I'm completely beside myself, and have no idea what I'm going to do. I can start from the beginning again, but that would take another YEAR. \[sigh\]

__So here's the screw-up.__ Apparently I coded everything correctly on paper, but due to my lack of experience I overlooked the potential for multiple appends to occur simultaneously. I can only assume that's what screwed it up, but I cannot be confident. Honestly, I still don't know specifically what the problem is. All in all, it looks good to me. Here is the relevant Python code.

def add2log(c,v):

def resumeFromLog():
 return eval("["+raw+"]")

__For what it's worth,__ this is what remains of the log file:


Newer: Tooth as a Radio Receiver?
Older: Converting Numbers to Morse Code with GCC
All Blog Posts