Where would the average bloke in the street go to find that in 1994? And where would they get that knowledge?
(I mean, these days, the first thing you'd do is Google, the second thing is ask on SO or similar. You'd do this before even thinking about coding something yourself. So the bar to jumping to brute force has shifted somewhat.)
(I'd love to live in a town where the average bloke in the street was interested in fast algorithms for computing π(x), that would be a neat place!)
You'd seek out a mathematician, or visit a university library and ask for the maths librarian. If you didn't know about those resources, you'd go to your public library, and hopefully a librarian would point you in the right direction. All of these search algorithms still work today. :)
As someone who had to write letters for information or ask experts over the phone in the 70s, 80s, and part of the 90s (BBSs in the late 80s to 90s for me), you'd have to have good luck finding the person with the bit of specialized knowledge you sought, and hope they had it. A nostalgic note: Our sixth grade teacher made us pick four big companies and write letters to them asking for information about them and their products. I remember being ecstatic getting letters, pamphlets and even items from them. Toothpaste from Colgate. The pamphlets were so much more informative than the marketing material today. They were pitched to a smarter audience possibly purchasing agents, etc. hTe fastest response was almost three weeks. The rest came a month and later.
I was just a fledgling in the late days of the BBSs, so I didn't spend too much time there!
Fair points about the trouble of finding the right expert. I also wasn't on any of the math-related Usenet groups back in the day (I was more of a comp.lang.* lurker), but I wonder if there was a good mingling of experts and novices in those groups. These days, you can (e.g.) visit /r/math or /r/mathematics on Reddit, and you'll occasionally see interesting novice questions being picked up by PhDs across various math fields -- sometimes with surprisingly deep responses. It's rare that a novice question merits such attention, but the fact that it can can happen -- that such a forum exists -- is delightful.
You've also reminded me of something, vaguely -- one of the major US universities used to have a phone number that you could call and ask them about nearly anything. They would research the question and get back to you with an answer if they could. I wish I could remember which university it was, maybe the number still exists?
(I mean, these days, the first thing you'd do is Google, the second thing is ask on SO or similar. You'd do this before even thinking about coding something yourself. So the bar to jumping to brute force has shifted somewhat.)