I try to explain Paxton's Wheel for #prime_numbers.
take number line, 1 thru 10... , and set 4 as Coprime w 1...
1 2 3 4 5 6 7 8 9 10...
| | | | | | | | | |
0 0 0 1 0 0 0 0 0 0 ...
start loop at 3...
X X 0 1 0 0 0 0 0 0...
leave 3 as 0 and print as 1st found prime.
POST #1
Alternative #paxtons_wheel for #prime_numbers :
import sys
p = [0]*1000000
while (1):
print (1,2)
i=3
n=999000
while (i<=n):
j=i*3
if(p[i]==0):
print(i)
while(j<=n):
p[j]=1
j=j+1
i=i+2
exit(1)
When compiled, this is FAST!
I finally managed to test my #code for my Paxton's Wheel
for #prime_numbers and it worked. I ended up using a
#raspberry P400 keyboard #computer and #coded in #python.
The next post will be the whole #method or #algorithm (ugh).
#Niki_codes.
I don't know if this is a thing already, but here goes...
Paxton's Principal on Primes: Every #coprime #number (non-prime) is a product of two or more #prime_numbers.
Because by defination, coprimes are multiples of two lower numbers besides 1. Any coprime factor can again be reduced
to primes.
More on #paxtons_wheel for #prime_numbers.
I was thinking that for the outer FOR loop, you only
have to test up to the square root of n. If you go any
higher, you're just repeating likewise calculations (ie.
5*19 = 19*5, etc.) This would save a large amount of
processing. This is integer math.
Ya know...my Paxton's Wheel for #prime_numbers might have #crypto applications if #programming is proper and the #mathematics is so elementary that it's downright #silly that people buy #bitcoin and other #cryptocurrency. (See previous posts)
The Pixie Goddess
Paxton's wheel for #prime_numbers in #mathematics
n=1000
p[0]*n
p[4]=1
while():
for x in range(3,n,2) :
if(p[x]==0) & (x*3<=n) :
for y in range(x*3,n,x) :
p[y]=1
print("1 2 ")
for x in range(3,n,2) :
if(p[x]==0) :
print(x)
ta,da, from the pixie goddess.
If I can get my Paxton's Wheel for Primes to work in C #programming language with some inline asselmbler , it should
be really fast. While memory wasting, its has no division, modulo division and minimal instruction cycles used per iteration. Coprimes are products of two or more #prime_numbers .
#prime_numbers #programming Paxton's Wheel for Primes.
n=1000
p=[0]*n
p[4]=1
while():
for x in range(3,n,2):
if(p[x+1]==0) & (x*3<=n):
for y in range(x*3,n,x):
p[y+1]=1
print("1 2")
for x in range(3,n,2):
if(p[x+1]==0):print(x)
Why can't I get this to work?