In the end, the solution turned out shorter, clearer, and more accurate than I was expecting, so I'm incredibly happy.
Yay for math.
In the background, I was doing LJ sysadmin stuff. No yays for that. But in time, Alan will learn the requisite black magic and rid me from this curse.
In other news, I've been watching so much Tivo that I'm out of stuff to watch. Dare I start watching new shows? No! Must resist.