Fun with primes

A long time ago, in a galaxy far … far … away …
I’ve been playing with primes for a while … computing them, etc. Have a neat way to represent any natural number (exluding 0) in terms of the exponents of their prime factors. Lots of reasons for playing with this. Started doing this before joining SGI … many moons ago, and used it as a way to entertain myself on airplanes when the laptop battery ran out. For some reason, I do my best coding 10km above the planetary surface.
I haven’t worked on this in a while, and I just couldn’t motivate myself to do some other stuff, so I figured I’d take a break and rework this. I had coded it in … fortran (yeah, really). So I reworked it into a little C, and have it set up so I can drive this from scripts to gather the data.
Ok, the notation in short (I don’t know if this is a common notation, I came up with it many years ago, and hopefully I re-invented someone elses wheel):
Let φi be the ith prime. Then any natural number N (excluding 0) may be written as ∏(i=1 .. ∞)φie(i). Prime numbers will have the e(i) as zeros everywhere apart from a single e(n)=1 on the nth prime exponent. And composite numbers will have patterns of 1 or greater on the exponents.
There are actually lots of cool things you can do with this notation, and I’ve got a few pages of notes and proofs somewhere in my basement of sum of 2 evens being even, sum of two odds being even, sum of even and odd being odd, and the interleaving of even and odd numbers.
Yeah, I am a closet mathematician. Complete amateur at best. But having fun with it.
So I just finished converting the old fortran code to C, and checking it. Using the above definition, and simply printing the exponents, here are the numbers from 1 to 10 (understanding that unprinted exponents after the last 1 or greater are zero).

  • 1 -> 0
  • 2 -> 1
  • 3 -> 0 1
  • 4 -> 2
  • 5 -> 0 0 1
  • 6 -> 1 1
  • 7 -> 0 0 0 1
  • 8 -> 3
  • 9 -> 0 2
  • 10 -> 1 0 1

Whats cool is you can see some very interesting patterns emerge.

Read moreFun with primes

Hmmm …

Saw this linked from /.. UEFI boot is to be replacing the old BIOS boot. There are positives about this and negatives. New software is always buggy, and UEFI won’t magically become bug free. UEFI has security controls for signed OS booting (ostensibly to protect users). But the abuse of security systems to exclude competitive/alternative … Read moreHmmm …

OT: What is and what should never be

Had to get a Led Zeppelin reference in at least once a year on the blog …
Pathology report came back.
Ok, in the movie series The Matrix, there is a set of scenes where the story tellers want you to believe that the character (Neo in the clip below’s case) was moving with “super-human” speed, and able to move an accelerate a very large mass (their body) faster than a very tiny mass (the bullet). They are trying to evoke a sense of great speed, and potentially high cost of not being able to move fast enough.
This is a metaphor, obviously, for what I am going to write about. Actually all the elements of the clip are a metaphor.
Here is the clip.

So, what happened?

Read moreOT: What is and what should never be

More than a year in, and where are they now?

Its 2-January-2012, and assuming the Mayans’ were wrong (ok technically I’ve not heard of any suggestion they did anything more than stop their calendar on a convenient-for-them boundary), an interesting question is, what has happened to the company-formerly-known-as-Sun’s HPC assets?
Lustre is one of the most well known, and it now has some type of future ahead of it. I’ll talk about that in a later post. This future was most definitely not assured 1 year ago, and there was considerable uncertainty in its longevity as Oracle had, about a year ago, let go most of the developers.

Read moreMore than a year in, and where are they now?