PrimeBase Numbers

Enter a base 10 number:
The PrimeBase representation:
The shorthand representation:
The sum representation:

One of math's most perplexing problems is to find a simple primality test. When a number is in a base 10 representation some numbers can automatically be rejected as being prime just by examining their last digits. For example any number, other than 2, ending in a 0, 2, 4, 6 or 8 is divisible by 2 and is therefore not prime. Also any number, other than 5, ending in a 0 or a 5 is divisible by 5 and thus not a prime. In a binary representation the same concept holds, but the roles are a little different. Any number ending in a zero is clearly not prime since it is divisible by 2. By using a base system composed of primes, I hope to discover a computationally efficient way to perform primality tests when given all prime numbers below the number to be tested.

This page uses a list of the first 10,000 primes. A number, x, is written in PrimeBase as the sequence of the largest prime numbers smaller than x necessary to express x as their sum. For example the prime numbers smaller than 10 are 2, 3, 5 and 7. We include 1 in this list as well though it is not prime. Thus 10 = 7 + 3, the two biggest prime numbers less than 10 that sum to 10, and the PrimeBase notation would be 10100. Reading this notation from left to right: the first 1 represents the 7s place, the first 0 represents the 5s place, the second 1 represents the 3s place, the second 0 represents the 2s place, and the third 0 represents the 1s place.

The inclusion of 1 in the list of "primes" may seem unneccesary since the Goldbach conjecture states that any integer greater than 2 can be written as the sum of at most 2 prime numbers. However, a number like 4 could not be expressed in terms of unique primes since 4 = 2 + 2. We want 4 to be expressed as the largest primes smaller than it so we want 4 = 3 + 1. This also means that due to the uniqueness of the primes our representation is essentially binary, but with an irregular base.

The shorthand notation listed above is a handy way of cutting down on the notation for representing numbers in base prime. The numbers in parentheses indicate the number of zeros between ones. For example, the number 35 is represented as 100000000101 in base prime and 1 (8) 1 (1) 1 in shorthand.

Last updated: 7/7/11.Submit comments here