login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A339084 Smaller term p1 of the first of two consecutive cousin prime pairs (p1,p1+4) and (p2,p2+4) such that the distance (p2-p1) is a square. 0
3, 127, 313, 1447, 2203, 2437, 2797, 3217, 4933, 5653, 6007, 7207, 7537, 7603, 7753, 8233, 10627, 11827, 12373, 20353, 22027, 22153, 23017, 23563, 25303, 27697, 27763, 29023, 29059, 29383, 31477, 32323, 32533, 32569, 32839, 33199, 33577, 35533, 36523, 37273, 41077 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Considering the 10^6 cousin prime pairs from (3,7) to (252115609,252115613), we note the following:
43617 sequence terms (4.4%) are linked to a distance between two consecutive cousin prime pairs which is a square.
List of the 9 classes of distances which are squares: 4,36,144,324,576,900,1296,1764,2304.
The distance 36 occurs with the highest frequency.
Distances linked to the first 50 terms of the sequence: 4,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,324,144,36,36,36,144,144,144,36,36,36,36,36,36,36,36,144,36,144,36,36,36
From the class 36, the frequency of the distances decreases when their size increases; the distance 4 linked to the first term of the sequence occurs only once.
See for comparison the sequence A338812.
LINKS
EXAMPLE
a(3)=313 is in the sequence because the two consecutive cousin prime pairs being (313,317) and (349,353), the distance between them is 349-313=36 which is a square (6^2).
613 is not in the sequence because the two consecutive cousin prime pairs being (613,617) and (643,647), the distance between them is (643-613)=30 which is not a square.
PROG
(R)
Mat<-matrix(0, 14000000, 5)
primes<-generate_n_primes(14000000)
Mat[, 1]<-c(primes)
a_n<-c()
Squares<-c()
Squares_sq<-c()
j=1
counter=0
while(j<=13999999){
if(is_prime((Mat[j, 1])+4) & is_prime((Mat[j+1, 1]))+4){
counter=counter+1
Mat[counter, 2]<-(Mat[j, 1])
Mat[counter, 3]<-Mat[j, 1]+4
Mat[counter+1, 2]<-(Mat[j+1, 1])
Mat[counter+1, 3]<-Mat[j+1, 1]+4
}
j=j+1
}
k=1
while(k<=1000000){
dist<- Mat[k+1, 2]-Mat[k, 2]
Mat[k, 4]<-dist
if(sqrt(dist)%%1==0){
Mat[k, 5]<-dist
a_n<-append(a_n, Mat[k, 2])
}
k=k+1
}
View(Mat)
View(a_n)
(PARI) lista(nn) = {my(last=3, p=7); forprime(q=11, nn, if(q-p==4, if (issquare(p-last), print1(last, ", ")); last = p; ); p = q; ); } \\ Michel Marcus, Nov 23 2020
CROSSREFS
Sequence in context: A139936 A221637 A142007 * A071151 A041867 A134711
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 19 12:27 EDT 2024. Contains 375302 sequences. (Running on oeis4.)