cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A052378 Primes followed by a [4,2,4] prime difference pattern of A001223.

Original entry on oeis.org

7, 13, 37, 97, 103, 223, 307, 457, 853, 877, 1087, 1297, 1423, 1483, 1867, 1993, 2683, 3457, 4513, 4783, 5227, 5647, 6823, 7873, 8287, 10453, 13687, 13873, 15727, 16057, 16063, 16183, 17383, 19417, 19423, 20743, 21013, 21313, 22273, 23053, 23557
Offset: 1

Views

Author

Labos Elemer, Mar 22 2000

Keywords

Comments

The sequence includes A052166, A052168, A022008 and also other primes like 13, 103, 16063 etc.
a(n) is the lesser term of a 4-twin (A023200) after which the next 4-twin comes in minimal distance [here it is 2; see A052380(4/2)].
Analogous prime sequences are A047948, A052376, A052377 and A052188-A052198 with various [d, A052380(d/2), d] difference patterns following a(n).
All terms == 1 (mod 6) - Zak Seidov, Aug 27 2012
Subsequence of A022005. - R. J. Mathar, May 06 2017

Examples

			103 initiates [103,107,109,113] prime quadruple followed by [4,2,4] difference pattern.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[Prime[x + 3] - Prime[x] == 10, AppendTo[a, Prime[x]]], {x, 1, 10000}]; a (* Zerinvary Lajos, Apr 03 2007 *)
    Select[Partition[Prime[Range[3000]],4,1],Differences[#]=={4,2,4}&][[All,1]] (* Harvey P. Dale, Jun 16 2017 *)
  • PARI
    is(n)=n%6==1 && isprime(n+4) && isprime(n+6) && isprime(n+10) && isprime(n) \\ Charles R Greathouse IV, Apr 29 2015

Formula

a(n) is the initial prime of a [p, p+4, p+6, p+6+4] prime-quadruple consisting of two 4-twins: [p, p+4] and [p+6, p+10].

A052351 Least prime in A023200 (lesser of 4-twins) such that the distance to the next 4-twin is 6*n.

Original entry on oeis.org

7, 67, 19, 43, 163, 127, 397, 229, 769, 1489, 673, 9547, 1009, 1783, 1693, 2857, 11677, 23869, 499, 1093, 4003, 28657, 10459, 29383, 12487, 6043, 41647, 7039, 17029, 19207, 15073, 24247, 65839, 29629, 18583, 9883, 66697, 100699, 7243, 53923, 82237, 6217, 76249
Offset: 1

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

a(n) is a "lesser of a 4-twin" prime whose distance to the next twin is 6n.
Both the smallest distance (A052380) and its increment for 4-twins is 6.
The prime a(n)=p is the first which determines a prime quadruple [p, p+4, p+6n, p+6n+4] and difference pattern of [4, 6n-4, 4].

Examples

			a(1) = 7 gives [7, 11,7+6 = 13, 17] with no primes between 11 and 13.
a(5) = 163 specifies [163, 167, 163+30 = 191, 193] with 4 primes between 167 and 193.
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 4] // Flatten; pp = p[[i]]; dd = Differences[pp]/6; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[10000] (* Amiram Eldar, Mar 04 2025 *)
  • PARI
    list(len) = {my(s = vector(len), c = 0, p1 = 7, q1 = 0, q2, d); forprime(p2 = 11, , if(p2 == p1 + 4, q2 = p1; if(q1 > 0, d = (q2 - q1)/6; if(d <= len && s[d] == 0, c++; s[d] = q1; if(c == len, return(s)))); q1 = q2); p1 = p2);} \\ Amiram Eldar, Mar 04 2025

Extensions

Name corrected by Amiram Eldar, Mar 04 2025

A227346 Distance between consecutive pairs of primes differing by 6 (p, p+6).

Original entry on oeis.org

2, 4, 2, 4, 6, 8, 6, 4, 6, 6, 8, 6, 6, 10, 14, 4, 2, 4, 24, 20, 6, 10, 6, 18, 2, 30, 4, 6, 18, 6, 6, 8, 6, 30, 4, 20, 16, 6, 14, 6, 10, 50, 10, 14, 4, 42, 38, 16, 6, 8, 16, 6, 8, 6, 6, 28, 6, 6, 24, 50, 6, 18, 70, 2, 30, 4, 20, 4, 60, 6, 24, 6, 14, 22, 20, 30
Offset: 1

Views

Author

Luca Pezzullo, Jul 08 2013

Keywords

Crossrefs

Cf. A023201 (n and n+6 are primes).
Cf. A053320 (differences for Cousin primes).

Programs

  • Maple
    with(numtheory): pre:=0: for n from 1 to 3000 do if isprime(n) and isprime(n+6) then if pre<>0 then printf("%d, ", n-pre) fi: pre:=n fi od: # adapted from original program by C. Ronaldo for A053320
  • Mathematica
    Differences[Select[Prime[Range[200]], PrimeQ[# + 6] &]] (* T. D. Noe, Jul 09 2013 *)

Formula

a(n) = A023201(n+1) - A023201(n). - Zak Seidov, Sep 20 2013

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Claude H. R. Dequatre, Nov 23 2020

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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
  • 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)
    
Showing 1-4 of 4 results.