I just wish I could understand it. Is this a formula? Or an iterative computer counting operation? Can you put it into algebra? I've been looking at this also, and expected to need two different formulas, one for odd N and another for even N. I even found two that work (produce the correct number). They have very little justification however, since the data set is so small. If your solution is a faster counter, can I trust the results to verify mine? Are we still in search of a formula?