Re: Towards a Formula for Primes



BEWARE, ALL WHO ENTER HERE, THE NOTORIOUS MINDLESS BICKERING OF
SCI.MATH.

I have at this point to correct one of my earlier statements. I do not
need bickering to help me. It helps nobody. I am perfectly capable of
correcting myself. I also accept the non-malicious counterexamples
from proper mathematicians. The mathematics decides.

I did a few preliminary studies of primes, in relation to binary
logic.

Something that is fairly obvious cropped up. If you XOR a number with
a different number, you can never get zero - the logical "false".

However, if you often get, for example, the number 1, you can subtract
1 from it to obtain the number zero.

I am not saying that this story that follows is exactly true, but I
know that George Boole was a school teacher. He may have said to one
pupil "What is 3 and 5", and obtained the answer "eight". He may have
said "CORRECT". He may have asked another pupil "multiply 3 and 5".
That other pupil may have said "eight", and been told "WRONG". He will
have replied "BUT YOU JUST SAID IT WAS CORRECT".

Perhaps triggered by such an incident, Boole seems to have pondered
the mathematical significance of "AND".

"Three AND five", in arithmetic, is the ADDITION. It represents the
verb to "ADD".

"Multiply three AND five" is a logical CONNECTIVE. The verb is not to
ADD, but to MULTIPLY.

Using 1 as a number for "true", and 0 as "false", he came up with

! * 1 is 1
1* 0 is 0
0 * 1 is 0
0 * 0 is 0

This is a TRUTH TABLE, but is also an ARITHMETIC TABLE.
Boole used the multiplication sign for logic "AND", and that continues
to this day.

With "AND" the first and second argument must be non-zero to get a non-
zero result.

For the OR table, we use addition

1 + 1 is 2
1 + 0 is 1
0 + 1 is 1
0 + 0 is 0

This is an arithmetic table. However, as ANY non-zero is taken as
"true", in Boolean arithmetic we have

1 + 1 is 1
1 + 0 is 1
0 + 1 is 1
0 + 0 is 0

One OR the other argument being "true" leads the result to be "true".

The + is used to represent "OR".

The 2 is changed into a 1 just to stop people being too preoccupied
with it as a number, rather than a "truth value".

So ARITHMETIC CAN DECIDE. I had previously believed the opposite.

So, by bringing XOR into the mathematics I have not added the power to
deliver a Boolean answer. Boole took his cue from arithmetic, and the
"decision-making" power came from there. Whether this is the original
Hilbert "decidability" is not yet clear to me.

The only thing that XOR seems to import into arithmetic is a (possibly
new to arithmetic) form of pseudo-randomness.

I wrote three tiny programs. The first displays the first 25 primes as
binary, followed by the 75 non-primes between 1 and 100.
They are written in Qbasic. Perhaps "Mix" would have been better.

The idea behind that is simply to see if some pattern can be spotted
in the binary that is unique to primes.

The next program uses XOR to combine a number with its previous. You
can see a kind of pseudo-randomness already.

The third uses XOR to combine a number with its double. Again, there
is pseudo-randomness.

The purpose is simply to become familiar with the behaviour of XOR.

I did not invent axiomatic analysis. That comes from the ancient
Greeks. However, before tackling the problem of primes, one has to be
sure the mathematical toolkit is complete. I am not convinced that it
is.

Charles Douglas Wehner

-------------------------------
Examining the binary of primes and non-primes:

PROGRAM
DIM a%(100)

FOR n = 2 TO 100
a%(n) = -1
NEXT n


FOR n = 2 TO 10
m = n + n
FOR m = m TO 100 STEP n
a%(m) = 0
NEXT m
NEXT n

PRINT

FOR n = 1 TO 100
IF a%(n) THEN PRINT n, : GOSUB bits
NEXT n

PRINT

FOR n = 1 TO 100
IF NOT a%(n) THEN PRINT n, : GOSUB bits
NEXT n

END

bits:
b = n
FOR bit = 1 TO 7
b = b + b
c = b
b = b AND 127
c = c AND 128
IF c THEN PRINT "1"; ELSE PRINT "0";
NEXT bit
PRINT
RETURN

OUTPUT

2 0000010
3 0000011
5 0000101
7 0000111
11 0001011
13 0001101
17 0010001
19 0010011
23 0010111
29 0011101
31 0011111
37 0100101
41 0101001
43 0101011
47 0101111
53 0110101
59 0111011
61 0111101
67 1000011
71 1000111
73 1001001
79 1001111
83 1010011
89 1011001
97 1100001

1 0000001
4 0000100
6 0000110
8 0001000
9 0001001
10 0001010
12 0001100
14 0001110
15 0001111
16 0010000
18 0010010
20 0010100
21 0010101
22 0010110
24 0011000
25 0011001
26 0011010
27 0011011
28 0011100
30 0011110
32 0100000
33 0100001
34 0100010
35 0100011
36 0100100
38 0100110
39 0100111
40 0101000
42 0101010
44 0101100
45 0101101
46 0101110
48 0110000
49 0110001
50 0110010
51 0110011
52 0110100
54 0110110
55 0110111
56 0111000
57 0111001
58 0111010
60 0111100
62 0111110
63 0111111
64 1000000
65 1000001
66 1000010
68 1000100
69 1000101
70 1000110
72 1001000
74 1001010
75 1001011
76 1001100
77 1001101
78 1001110
80 1010000
81 1010001
82 1010010
84 1010100
85 1010101
86 1010110
87 1010111
88 1011000
90 1011010
91 1011011
92 1011100
93 1011101
94 1011110
95 1011111
96 1100000
98 1100010
99 1100011
100 1100100
-------------------------------------
Number XOR previous (or number xor next)

PROGRAM
FOR m = 2 TO 100
PRINT m,
n = m XOR (m - 1)
PRINT n,
GOSUB bits
NEXT m

END

bits:
b = n
FOR bit = 1 TO 7
b = b + b
c = b
b = b AND 127
c = c AND 128
IF c THEN PRINT "1"; ELSE PRINT "0";
NEXT bit
PRINT
RETURN

OUTPUT:

2 3 0000011
3 1 0000001
4 7 0000111
5 1 0000001
6 3 0000011
7 1 0000001
8 15 0001111
9 1 0000001
10 3 0000011
11 1 0000001
12 7 0000111
13 1 0000001
14 3 0000011
15 1 0000001
16 31 0011111
17 1 0000001
18 3 0000011
19 1 0000001
20 7 0000111
21 1 0000001
22 3 0000011
23 1 0000001
24 15 0001111
25 1 0000001
26 3 0000011
27 1 0000001
28 7 0000111
29 1 0000001
30 3 0000011
31 1 0000001
32 63 0111111
33 1 0000001
34 3 0000011
35 1 0000001
36 7 0000111
37 1 0000001
38 3 0000011
39 1 0000001
40 15 0001111
41 1 0000001
42 3 0000011
43 1 0000001
44 7 0000111
45 1 0000001
46 3 0000011
47 1 0000001
48 31 0011111
49 1 0000001
50 3 0000011
51 1 0000001
52 7 0000111
53 1 0000001
54 3 0000011
55 1 0000001
56 15 0001111
57 1 0000001
58 3 0000011
59 1 0000001
60 7 0000111
61 1 0000001
62 3 0000011
63 1 0000001
64 127 1111111
65 1 0000001
66 3 0000011
67 1 0000001
68 7 0000111
69 1 0000001
70 3 0000011
71 1 0000001
72 15 0001111
73 1 0000001
74 3 0000011
75 1 0000001
76 7 0000111
77 1 0000001
78 3 0000011
79 1 0000001
80 31 0011111
81 1 0000001
82 3 0000011
83 1 0000001
84 7 0000111
85 1 0000001
86 3 0000011
87 1 0000001
88 15 0001111
89 1 0000001
90 3 0000011
91 1 0000001
92 7 0000111
93 1 0000001
94 3 0000011
95 1 0000001
96 63 0111111
97 1 0000001
98 3 0000011
99 1 0000001
100 7 0000111
-------------------------------------------

Number XOR its double:

PROGRAM
FOR m = 2 TO 100
PRINT m,
n = m XOR (m + m)
PRINT n,
GOSUB bits
NEXT m

END

bits:
b = n
FOR bit = 1 TO 8
b = b + b
c = b
b = b AND 255
c = c AND 256
IF c THEN PRINT "1"; ELSE PRINT "0";
NEXT bit
PRINT
RETURN

OUTPUT:

2 6 00000110
3 5 00000101
4 12 00001100
5 15 00001111
6 10 00001010
7 9 00001001
8 24 00011000
9 27 00011011
10 30 00011110
11 29 00011101
12 20 00010100
13 23 00010111
14 18 00010010
15 17 00010001
16 48 00110000
17 51 00110011
18 54 00110110
19 53 00110101
20 60 00111100
21 63 00111111
22 58 00111010
23 57 00111001
24 40 00101000
25 43 00101011
26 46 00101110
27 45 00101101
28 36 00100100
29 39 00100111
30 34 00100010
31 33 00100001
32 96 01100000
33 99 01100011
34 102 01100110
35 101 01100101
36 108 01101100
37 111 01101111
38 106 01101010
39 105 01101001
40 120 01111000
41 123 01111011
42 126 01111110
43 125 01111101
44 116 01110100
45 119 01110111
46 114 01110010
47 113 01110001
48 80 01010000
49 83 01010011
50 86 01010110
51 85 01010101
52 92 01011100
53 95 01011111
54 90 01011010
55 89 01011001
56 72 01001000
57 75 01001011
58 78 01001110
59 77 01001101
60 68 01000100
61 71 01000111
62 66 01000010
63 65 01000001
64 192 11000000
65 195 11000011
66 198 11000110
67 197 11000101
68 204 11001100
69 207 11001111
70 202 11001010
71 201 11001001
72 216 11011000
73 219 11011011
74 222 11011110
75 221 11011101
76 212 11010100
77 215 11010111
78 210 11010010
79 209 11010001
80 240 11110000
81 243 11110011
82 246 11110110
83 245 11110101
84 252 11111100
85 255 11111111
86 250 11111010
87 249 11111001
88 232 11101000
89 235 11101011
90 238 11101110
91 237 11101101
92 228 11100100
93 231 11100111
94 226 11100010
95 225 11100001
96 160 10100000
97 163 10100011
98 166 10100110
99 165 10100101
100 172 10101100


.



Relevant Pages

  • Re: Towards a Formula for Primes
    ... I generalised the concept of a system of mathematics that moves a ... By the discovery of pseudorandomness in primes, ... I recommended that the XOR function be moved ... we have all the axioms we need in an "xor transarithmetic". ...
    (sci.math)
  • Re: Towards a Formula for Primes
    ... Perhaps triggered by such an incident, Boole seems to have pondered ... by bringing XOR into the mathematics I have not added the power to ... new to arithmetic) form of pseudo-randomness. ...
    (sci.math)
  • Re: How good an encryption algorithm is this?
    ... >Why would people before the age of computers understand binary? ... Number bases are a part of mathematics. ... logic", including rigorous definitions of NEGATION, AND, OR, and XOR. ... that NOTHING about computers is new. ...
    (microsoft.public.vc.language)
  • Re: How good an encryption algorithm is this?
    ... >Why would people before the age of computers understand binary? ... Number bases are a part of mathematics. ... logic", including rigorous definitions of NEGATION, AND, OR, and XOR. ... that NOTHING about computers is new. ...
    (microsoft.public.dotnet.languages.csharp)

Loading