Idle Musings

Being part of Western culture can mean an eternal comparison to other denizens of the culture in terms of achievement, a savage drive to achieve in terms of novelty: the discovery of the new mammal, the creation of a new technology, etc. Thus we have the Patent Office and scientific journals innumerable. This can induce the feeling of redundancy, if one has completely accepted this culture.

But it’s also possible to explore simply with the intention of the joy of bending one’s mind over and around something. This can be as concrete as the retired guy doing woodworking in the garage, or something more abstract. A lot of my programming has gone down this path – sure, someone has solved what I’m trying to solve, maybe better than I can possibly hope to achieve – and possibly that solution is sitting in that Design Patterns book I can see from chair here at home. I found Design Patterns to be quite the sleeper, which I suppose is a commentary on my professional attitudes[1]. However, my point is that the pleasure of pursuing a solution is more important to me than knowing the solution itself. And if I come up with a better solution, so much the better.

So in the latter spirit, and because I write this blog to vent all sorts of pressures, I write the following.


Due to a recent article in NewScientist (7 October 2017, paywall) I’ve been musing on the topic of prime numbers. These are critical to encryption, but they’re interesting in and of themselves. First, some terminology.

P is the set of prime numbers, where Pn is the nth member of P. P0 is 2, P1 is 3, etc.

n is the nth member of P.

N is the set of natural numbers > 1.

m is the mth member of N.

+ (sub +) means one or more.

One of the mysteries of prime numbers is how to efficiently calculate them. There are formulas for calculation of primes, but they are not efficient – by which I mean they have an algorithmic complexity of O(n2) or worse, where n = the prime desired.

At this juncture I’ll note that my mathematical training is fairly minimal, and my grasp of the technical language, wobbly at best, has degraded markedly over the years.

So I wonder what would happen if we thought of N, of which P‘s contents are members, as, well, a secondary set, and P as a foundational set, a set upon which N depends. How, then, would they be related?

I think it’d be a projection. Think of N as an ordered series of Pn-derivatives, by which I mean that each Nm is ultimately related to P+. The projection, which I suspect is a set of equations, calculates the value Nm. For Nm which are prime, the selected equation is trivially

Pn * 1

The balance of N will be built from P+. But what is the relationship between n and m? That’s the worldly goal. The next step is understanding the equations involved, and as importantly – no, more so – the proper way to select which equation to use to calculate Nm. Once that is understood, then perhaps a more efficient worldly goal can be realized.

Or not. I’m just bumbling along here without reference to the weighty literature on the subject, nor any particular mathematical skills. Just havin’ fun.



1Sitting right next to it is Functional Programming: Practice And Theory, Bruce MacLennan, which I think should be on every programmer’s shelf, and yes I’ve read darn near the whole thing. Couldn’t quite stand the highly theoretical material. But for what the future of programming should be, this is part of it.

 

Bookmark the permalink.

About Hue White

Former BBS operator; software engineer; cat lackey.

Comments are closed.