Browse Groups

• Define Closest n^2+1 twin primes as numbers n =m+10*t /+2 t=0,1,2,3,... (m=4 mod 10) such that n^2+1 is prime This naming could be changed: a name
Message 1 of 4 , Oct 27, 2004
View Source
Define Closest n^2+1 twin primes as numbers n =m+10*t /+2 t=0,1,2,3,... (m=4 mod 10)
such that n^2+1 is prime
This naming could be changed: a name is a name is.......
In the range 10^6<n<1.1*10^7 there are only 7 of these n with Jens length k=6. Only first number is given.

1312984

5442564

7820414

7927514

8224964

9968244

10140104

And none with k=8

With k=6 we could find a n^2+1 prime l-tupet of maximal lengh 12 ,the sequence for n mod 10 would be 6;0;4,6,0,4,6,0,4,6,0,4 (with a lot of luck). I did not even find the central 8-tuplet for the results above.

And with k=10 the maximal l-tuplet would be l=18.

These results were found with a very slow Ubasic program which does the equivalent work as checking for n^2+1 primarility all n=4 or 6 (mod 10) with a speed for 13 digits n^2+1 numbers of
0.025 seconds*number/Ghz.
The speed decreases exponentially,i think.
I am a self taught non-programmer ,so the program could be enhanced.

Here it is if anybody wants to toy with it.
COPYLEFT

1 ' PRIMOS de la forma N^2+1 desde Ni hasta N (Ni<N)
2 ' El programa calcula los primos n^2+1 resolviendo la ecuación diofántica m=n^2+a^2=b^2+c^2 m es primo <=>n=b,a=c Para a=1 m=n^2+1=b^2+c^2 (1) Generamos primero el conjunto de todos los n pares que cumplen (1) y lo sustraemos del conjunto de los números pares obteniendo así todos los primos n^2+1. No es necesario el conocimiento previo de ningún primo ni cribar Erastoténicamente
10 word 5:clr time
20 Ni=10^7+10^6 : b=10^6 :N=Ni+b :ca=b\400 :N1=2*10^4 :dim A(N1\2) :dim B(N1\2) :dim C(ca) 'Ni debe ser 0 o múltiplo de N1 N1 es un bloque de cálculo que puede modificar el tiempo de computación.Introduzca los valores de Ni y de N que desee.
21 'Para N>200000 N1=2000 es màs rápido y N1=4000 es mejor para 4*10^5<N<1.6*10^6
22 'El programa principal ha sido modificado para hallar en éste los primos gemelos n^2+1 consecutivos en mínima progresión aritmética de la forma : n=m+10*l /+2 ( l=0,1,2,3,....). El programa imprime sólo n y n+12--->longitud 2. Si 2 resultados contiguos son n y n+10,hemos encontrado una longitud 3.
23 R=N\N1:R1=res:if R1>0 R=R+1
25 Ri=Ni\N1:R2=res:if Ri=0 R2=0
30 for L=Ri to R-1:Y=0
40 M1=N1*L+R2:M2=N1*(L+1)
50 for U=3 to isqrt(M2) ' De 50 a 200 se generan los n pares tal que n^2+1=b^2+c^2,es decir los n tal que n^2+1 es compuesto. El límite para los primos n^2+1 es 2^64=(límite Ubasic)^2
60 for V=1 to U-1
70 if gcd(U,V)<>1 or odd(U) and odd(V) goto 200
80 M=U^2+V^2:if nxtprm(M-1)<>M goto 200 ' no es necesario que M sea primo para generar todos los n, pero acorta el tiempo de computación.
85 if M>M2 goto 200
90 P=modinv(U,V):Q=V-P
100 if M1=0 K1=0 else K1=M1\(2*M)-1
110 K2=M2\(2*M)+1
120 for K=K1 to K2
130 S=(P*M-U)\V:if odd(S) S=S+M elseif S<0 S=S+2*M
140 T=(Q*M+U)\V:if odd(T) T=T+M
150 B=S+2*K*M:C=T+2*K*M
160 if B>M2 and C>M2 cancel for:goto 200
170 if 2,B@108,B@100,B>=M1,Band{B@10<>2,B@10<>8,B@10<>0,B>=M1,B<=M2,B<=N,find(B,A(0),Y)<0} Y=Y+1:A(Y)=B
180 if 2,C@108,C@100,C>=M1,Cand{C@10<>2,C@10<>8,C@10<>0,C>=M1,C<=M2,C<=N,find(C,A(0),Y)<0} Y=Y+1:A(Y)=C
190 next K
200 next V:next U
210 if R1>0 and L=R-1 U1=R1\2 else U1=N1\2 'sustracción de los conjuntos, para obtener los B(I) tales que B(I)^2+1 es primo.
220 for I=1 to U1:Z=2*I+M1:if 2">Z@10<>2 and 8">Z@10<>8 and 0">Z@10<>0 B(I)=Z
230 for J=1 to Y:if B(I)=A(J) B(I)=B(I)-(A(J)):cancel for:goto 250
240 next J
250 if and{B(I)<>0,B(I-1)<>0,B(I-1)=B(I)-2} X=X+1:C(X)=B(I)
270 next I
280 next L
282 print "X=";X
285 for Xa=2 to X:if C(Xa)-C(Xa-1)=10 print C(Xa-1)-2;C(Xa):Xb=Xb+1
287 next Xa
290 print "Y="; Y;time
295 print "# 2-closest n^2+1 twins=";Xb
300 end

If you want to understand the Spanish comments ,use a computer-translator and you¨ll probably understand less than guessing it.
Another possibility is learning Spanish.We had to do that with English.

This program is forbidden for use by the non-beloved Bare and Blush.
(Cualquier parecido con la realidad es pura coincidencia.)

---------------------------------

[Non-text portions of this message have been removed]
• ... By far the best suggestion! Paul
Message 1 of 4 , Oct 27, 2004
View Source
On Wed, 2004-10-27 at 19:54, Robin Garcia wrote:

> Another possibility is learning Spanish.We had to do that with English.

By far the best suggestion!

Paul
• ... It sounds like you require Closest to have consecutive t s. Then there are no solutions for t 5 as shown below. My suggestion was the closest they can
Message 1 of 4 , Oct 28, 2004
View Source
Robin Garcia wrote:
> Define Closest n^2+1 twin primes as numbers
> n =m+10*t /+2 t=0,1,2,3,... (m=4 mod 10) such that n^2+1 is prime
> This naming could be changed: a name is a name is.......

It sounds like you require "Closest" to have consecutive t's.
Then there are no solutions for t>5 as shown below.
My suggestion was "the closest they can be together".
I think you have to define something like that for large sets.
My page currently goes to k=18. A larger set would require 10 twin pairs.

2 divides n^2+1 for all odd n.
5 divides n^2+1 for even n = 2,8,12,... (mod 10)
Then a n^2+1 twin must have n = 4 and 6 (mod 10) to avoid the factor 5.

Of n values = 4 or 6 (mod 10), 17 divides n^2+1 for
n = 4,64,106,166,174,... (mod 170)

This means there can be at most 5 consecutive t values giving n^2+1 twins
on the form n = m+10*t+(0 and 2).
Those twins can start at n = 14 or 114 (mod 170).
I have not computed any but they should be plenty.

Of n values = 4 or 6 (mod 10), 13 divides n^2+1 for
n = 34,44,86,96,164,... (mod 130)
For n = 104 to 156 (mod 130), there are 6 consecutive twin candidates
avoiding 13 as factor, so 17 is actually more limiting than 13 in our case.

--
Jens Kruse Andersen
• Thanks to Jens for showing that t
Message 1 of 4 , Nov 1, 2004
View Source
Thanks to Jens for showing that t <=4 for n=m+10*t+ 0 / 2 (t=0,1,2,3,4)
such that n^2+1 is prime for all t.
And to Mike for finding tha smallest n^2+1 prime k-tuplets.

29 divides n^2+1 for n=45,104,186,244 (mod 290)
37 " n=6,154,564 (mod 370)

And greater 4k+1 primes allow wider consecutive t values.

5 pairs of consecutive t¨s must be 114 or 624 or 1544 (mod 2210) for the first number .(there is another residue) .
Could Mike try to find the least such 5 pair? (I only have a 220 Mhz Cyrix)
If the first number is m=624 (mod 2210) a 16- n^2+1 tuplet could be found:
m-4 +0,4,6,10,14,16,20,24,26,34,36,40,44,46,50,54
If m=1544 (mod 2210) another 16-tuplet
m-8 +0,4,8,10,14,18,20,28,30,34,38,40,44,48,50,54
So it seems that a 10-tuplet is s,....,s+32

Since there are only 9 n=4 or 6 (mod 130) values such that n^2+1 is not divisible by 13 there is at most a k=18 set of closest n^2+1 twin primes.
Combining with 17 divisibility it seems that the largest is k=16 -------->

(m=114 (mod 2210) +0/2 ) +0,10,20,30,40,70,80,90

Check that,please.I hope i didn¨t mess somewhere.

Robin Garcia

---------------------------------

[Non-text portions of this message have been removed]
Your message has been successfully submitted and would be delivered to recipients shortly.
• Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
• Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer. We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.