...

I made this example program in Flex 4, but it doesn't support a BigInteger library; I just

like the effects;

...

here's the L-Sequence in its most raw form, without a decision tree for L. it must have one

L (-) type and one L (+) type to prove a number prime! I tested a 210-digit number for its

primality, and after blinking too long, it said it was prime; the APRT-CLE algorithm under

nearly the same platform took 27.3 seconds & its vectors were not calculated, but stored!

I can send to you a Java applet that confirms the primality of a 1000-digit number in 3-4

seconds without the worry of pseudo-primes! my e-mail is leavemsg1@yahoo.com.

...

100 CLS : C = 1

102 DIM A(10001), LT(1), T(10001)

104 FOR N = 3 TO 7919 STEP 2

105 IF N MOD 3 <> 0 AND N MOD 5 <> 0 AND N <> 7 THEN

106 REM *** Compute the numbered terms of the L-Sequence ***

108 A(0) = N: A(1) = (N + 1) / 2: A(2) = A(1) - 1

110 FOR I = 3 TO 10001 STEP 2

112 IF A(I - 1) < 3 THEN

114 IF A(I - 1) = 2 THEN

116 A(I) = 1: A(I + 1) = 0

118 M = I + 1: I = 10001

120 ELSE

122 A(I) = 0: M = I: I = 10001

124 END IF

126 ELSE

128 IF A(I - 1) MOD 2 = 1 THEN

130 A(I) = A(I - 2) / 2

132 ELSE

134 A(I) = (A(I - 2) + 1) / 2

136 END IF

138 A(I + 1) = A(I) - 1

140 END IF

142 NEXT I

143 REM *** I think there's more parity change near, on, or after ((N-1)/4) ***

144 D = 0: L = INT((N - 1)/4): LL = L: LT(0) = 2: LT(1) = 2

146 WHILE (L < N - 2)

148 T(M) = 2: T(M - 1) = L: T(M - 2) = (T(M - 1) ^ 2 - 2) MOD N

150 IF T(M - 2) < 2 THEN T(M - 2) = T(M - 2) + N

152 IF T(M - 2) <> 2 THEN

154 K = 0: Z1 = 0: Z2 = 0

155 REM *** Compute the values of the terms in the L-Sequence ***

156 FOR J = M - 3 TO 0 STEP -1

158 IF A(J) MOD 2 = 1 THEN

160 IF A(J) = A(J + 1) + A(J + 2) THEN K = 0 ELSE K = 1

162 T(J) = (T(J + 1 + K) * T(J + 2 + K) - L) MOD N

164 ELSE

166 T(J) = (T(J + 2) ^ 2 - 2) MOD N

168 END IF

170 IF T(J) < 2 THEN T(J) = T(J) + N

172 NEXT J

174 Z1 = (T(2) ^ 2 - 2) MOD N

176 IF Z1 < 2 THEN Z1 = Z1 + N

178 Z2 = (T(1) ^ 2 - 2) MOD N

180 IF Z2 < 2 THEN Z2 = Z2 + N

181 REM *** Evaluate whether N is prime or composite ***

182 IF T(0) = L THEN

184 IF Z1 = 2 AND Z2 = T(M - 2) THEN

186 LT(D) = -1

188 ELSE

190 IF Z1 = T(M - 2) AND Z2 = 2 THEN

192 LT(D) = 1

194 ELSE

195 IF LMAX < L - LL THEN LMAX = L - LL

196 PRINT N; "is composite!": L = N - 2

198 END IF

200 END IF

202 ELSE

203 IF LMAX < L - LL THEN LMAX = L - LL

204 PRINT N; "is composite!": L = N - 2

206 END IF

208 IF LT(0) = -LT(1) THEN

209 IF LMAX < L - LL THEN LMAX = L - LL

210 PRINT N; L; "is prime!": L = N - 2: C = C + 1

212 END IF

214 D = 1

216 END IF

218 L = L + 1

220 WEND

222 ELSE

224 IF N = 3 OR N = 5 OR N = 7 THEN

226 PRINT N; "is prime!": C = C + 1

228 ELSE

230 PRINT N; "is composite!"

232 END IF

234 END IF

236 NEXT N

237 REM *** LMAX + 1 is the maximum number of trials in the range ***

238 PRINT C; LMAX + 1

240 END

...

I counted 1000 primes after it got to 7919, and the maximum number of trials for L was 10.

The number of blind trials could be avoided by computing JACOBI(L^2-4, N) as long as the

two inputs are co-prime to each other. It's probably best to find the place between 3 & N-1

where the parity is most likely to change to keep things simple; I think that's near ((N-1)/4),

but I could be wrong.

...

just between you, me, and the fence post... I think that you'll agree that anyone can enjoy

searching for prime numbers; over the years, I've noticed that some math people feel that

they aren't intelligent enough to explore newer methods for finding them while others will

remind you that if you're wrong about an algorithm, then you haven't read enough to have

kept up with the current trends; that's a bunch of crap!

...

I firmly believe in the K.I.S.S. principle... Keep It Simple Stupid! if it's too complicated, then

you're probably the one making it too complicated. why do you think investigators like the

famous Sherlock Holmes always enjoyed blurting out... "elementary... my dear Watson!" ???

...

first, I do NOT want to have to know much about prime numbers to know if I have one or NOT.

we already know too much... that infinitely many of them exist, that their pattern is somewhat

irregular, and that people try to find prime numbers of a particular format that they believe to

be relatively scarce or have some profound importance.

...

I do NOT even want to have to be familar with a smaller set of primes to be able to declare that

I've found one that is supposedly larger. I just want to know that my arithmetic is correct, that I

can use a process over and over, if necessary, and that it contains a small amount of variation

during my calculations... variety is the spice of life!

...

I'm NOT even interested if the so-called factors of a number are prime themselves, just whether

or NOT a simple product of factors will bring me back to the original number, or that a search

for factors of a number has come up empty!

...

here's the code for factoring a number. it would require George Woltman's FFT algorithm to find

the factors, but it works rather well. I've written it in PHP5 using the BCmath functions. Enjoy!

4/21/2015 Bill Bouris

...

(this section has been deleted by its author)

...

it'll be like finding Darwin's black cat in a dark room, and I've already told you that we're blind!

we only have to decide one thing... do we skin the cat (be careful our knife is sharp!) or do we

feed it (we don't want him to leave us with any presents outside the litter box!) ??

...

I made this example program in Flex 4, but it doesn't support a BigInteger library; I just

like the effects;

...

here's the L-Sequence in its most raw form, without a decision tree for L. it must have one

L (-) type and one L (+) type to prove a number prime! I tested a 210-digit number for its

primality, and after blinking too long, it said it was prime; the APRT-CLE algorithm under

nearly the same platform took 27.3 seconds & its vectors were not calculated, but stored!

I can send to you a Java applet that confirms the primality of a 1000-digit number in 3-4

seconds without the worry of pseudo-primes! my e-mail is leavemsg1@yahoo.com.

...

100 CLS : C = 1

102 DIM A(10001), LT(1), T(10001)

104 FOR N = 3 TO 7919 STEP 2

105 IF N MOD 3 <> 0 AND N MOD 5 <> 0 AND N <> 7 THEN

106 REM *** Compute the numbered terms of the L-Sequence ***

108 A(0) = N: A(1) = (N + 1) / 2: A(2) = A(1) - 1

110 FOR I = 3 TO 10001 STEP 2

112 IF A(I - 1) < 3 THEN

114 IF A(I - 1) = 2 THEN

116 A(I) = 1: A(I + 1) = 0

118 M = I + 1: I = 10001

120 ELSE

122 A(I) = 0: M = I: I = 10001

124 END IF

126 ELSE

128 IF A(I - 1) MOD 2 = 1 THEN

130 A(I) = A(I - 2) / 2

132 ELSE

134 A(I) = (A(I - 2) + 1) / 2

136 END IF

138 A(I + 1) = A(I) - 1

140 END IF

142 NEXT I

143 REM *** I think there's more parity change near, on, or after ((N-1)/4) ***

144 D = 0: L = INT((N - 1)/4): LL = L: LT(0) = 2: LT(1) = 2

146 WHILE (L < N - 2)

148 T(M) = 2: T(M - 1) = L: T(M - 2) = (T(M - 1) ^ 2 - 2) MOD N

150 IF T(M - 2) < 2 THEN T(M - 2) = T(M - 2) + N

152 IF T(M - 2) <> 2 THEN

154 K = 0: Z1 = 0: Z2 = 0

155 REM *** Compute the values of the terms in the L-Sequence ***

156 FOR J = M - 3 TO 0 STEP -1

158 IF A(J) MOD 2 = 1 THEN

160 IF A(J) = A(J + 1) + A(J + 2) THEN K = 0 ELSE K = 1

162 T(J) = (T(J + 1 + K) * T(J + 2 + K) - L) MOD N

164 ELSE

166 T(J) = (T(J + 2) ^ 2 - 2) MOD N

168 END IF

170 IF T(J) < 2 THEN T(J) = T(J) + N

172 NEXT J

174 Z1 = (T(2) ^ 2 - 2) MOD N

176 IF Z1 < 2 THEN Z1 = Z1 + N

178 Z2 = (T(1) ^ 2 - 2) MOD N

180 IF Z2 < 2 THEN Z2 = Z2 + N

181 REM *** Evaluate whether N is prime or composite ***

182 IF T(0) = L THEN

184 IF Z1 = 2 AND Z2 = T(M - 2) THEN

186 LT(D) = -1

188 ELSE

190 IF Z1 = T(M - 2) AND Z2 = 2 THEN

192 LT(D) = 1

194 ELSE

195 IF LMAX < L - LL THEN LMAX = L - LL

196 PRINT N; "is composite!": L = N - 2

198 END IF

200 END IF

202 ELSE

203 IF LMAX < L - LL THEN LMAX = L - LL

204 PRINT N; "is composite!": L = N - 2

206 END IF

208 IF LT(0) = -LT(1) THEN

209 IF LMAX < L - LL THEN LMAX = L - LL

210 PRINT N; L; "is prime!": L = N - 2: C = C + 1

212 END IF

214 D = 1

216 END IF

218 L = L + 1

220 WEND

222 ELSE

224 IF N = 3 OR N = 5 OR N = 7 THEN

226 PRINT N; "is prime!": C = C + 1

228 ELSE

230 PRINT N; "is composite!"

232 END IF

234 END IF

236 NEXT N

237 REM *** LMAX + 1 is the maximum number of trials in the range ***

238 PRINT C; LMAX + 1

240 END

...

I counted 1000 primes after it got to 7919, and the maximum number of trials for L was 10.

The number of blind trials could be avoided by computing JACOBI(L^2-4, N) as long as the

two inputs are co-prime to each other. It's probably best to find the place between 3 & N-1

where the parity is most likely to change to keep things simple; I think that's near ((N-1)/4),

but I could be wrong.

...

just between you, me, and the fence post... I think that you'll agree that anyone can enjoy

searching for prime numbers; over the years, I've noticed that some math people feel that

they aren't intelligent enough to explore newer methods for finding them while others will

remind you that if you're wrong about an algorithm, then you haven't read enough to have

kept up with the current trends; that's a bunch of crap!

...

I firmly believe in the K.I.S.S. principle... Keep It Simple Stupid! if it's too complicated, then

you're probably the one making it too complicated. why do you think investigators like the

famous Sherlock Holmes always enjoyed blurting out... "elementary... my dear Watson!" ???

...

first, I do NOT want to have to know much about prime numbers to know if I have one or NOT.

we already know too much... that infinitely many of them exist, that their pattern is somewhat

irregular, and that people try to find prime numbers of a particular format that they believe to

be relatively scarce or have some profound importance.

...

I do NOT even want to have to be familar with a smaller set of primes to be able to declare that

I've found one that is supposedly larger. I just want to know that my arithmetic is correct, that I

can use a process over and over, if necessary, and that it contains a small amount of variation

during my calculations... variety is the spice of life!

...

I'm NOT even interested if the so-called factors of a number are prime themselves, just whether

or NOT a simple product of factors will bring me back to the original number, or that a search

for factors of a number has come up empty!

...

here's the code for factoring a number. it would require George Woltman's FFT algorithm to find

the factors, but it works rather well. I've written it in PHP5 using the BCmath functions. Enjoy!

4/21/2015 Bill Bouris

...

(this section has been deleted by its author)

...

it'll be like finding Darwin's black cat in a dark room, and I've already told you that we're blind!

we only have to decide one thing... do we skin the cat (be careful our knife is sharp!) or do we

feed it (we don't want him to leave us with any presents outside the litter box!) ??

...