Byte01
Bit0123456701234567
Value21232729313337394143474951535759
PrimeFTFTTFTFTTTFFTFT
Hex5AE5

As primes become larger, the density of primes becomes smaller as 1/ln(n). Thus the density of true bits also falls off. The number of digits (binary or decimal) to represent the primes grows as ln(n). Thus, a sequence of primes represented as primec is always competitive in size with the corresponding sequence in ASCI text or binary, besides providing fast direct access by value:

bool isPrime(value).

The results for the sequence of the largest 64 bit primes (18446744073707000000 to 18446744073709551558) is:

FormatSize
(KB)
64 Bit Binary445
Txt1150
Zip Txt114
PrimeC125

Programs

Among the programs in the "program.zip" package are:

BuildTxtPrimeCreate file of primes, txt format
TxtToPrimeCConvert txt to primec format.
GoldbachVerify Goldbach's conjecture
for zero to 1E12

Among the more than 15 classes and utilities are: