It seemed fairly obvious that primes were somehow involved, but I cheated and looked up the sequence (in the amazingly useful "encyclopedia of integer sequences"). It gives the formula though, as ever, the description is difficult to interpret for non-mathematicians (such as myself). |