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-9 of 9 results.

A140382 Duplicate of A094343.

Original entry on oeis.org

3, 7, 7, 11, 13, 17, 19, 23, 37, 41, 43, 47, 67, 71, 79, 83, 97
Offset: 1

Views

Author

Keywords

A140446 List of prime pairs of form p, p+14.

Original entry on oeis.org

3, 17, 5, 19, 17, 31, 23, 37, 29, 43, 47, 61, 53, 67, 59, 73, 83, 97, 89, 103, 113, 127, 137, 151, 149, 163, 167, 181, 179, 193, 197, 211, 227, 241, 257, 271, 263, 277, 269, 283, 293, 307, 317, 331, 353, 367, 359, 373, 383, 397, 419, 433, 443, 457, 449, 463
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 26 2008

Keywords

Comments

The two primes p and p+14 are not necessarily adjacent.
Is 17 the only term that appears twice? There are no other examples up to the 5 millionth prime. - Harvey P. Dale, Nov 14 2024

Examples

			The pairs are (3, 17), (5, 19), (17, 31) etc.
		

Crossrefs

Programs

  • Mathematica
    Flatten[{#,#+14}&/@Select[Prime[Range[100]],PrimeQ[#+14]&]] (* Harvey P. Dale, Nov 14 2024 *)

Extensions

Corrected a(36) (241 with 271); more terms from Vincenzo Librandi, Oct 18 2009

A140447 List of prime pairs of form p, p+22.

Original entry on oeis.org

7, 29, 19, 41, 31, 53, 37, 59, 61, 83, 67, 89, 79, 101, 109, 131, 127, 149, 151, 173, 157, 179, 211, 233, 229, 251, 241, 263, 271, 293, 331, 353, 337, 359, 367, 389, 379, 401, 397, 419, 409, 431, 421, 443, 439, 461, 457, 479, 487, 509, 499, 521, 541, 563, 547
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 26 2008

Keywords

Comments

The two primes p and p+22 are not necessarily adjacent.

Examples

			The pairs are (7, 29), (19, 41), (31, 53) etc.
		

Crossrefs

Programs

  • Mathematica
    {#, # + 22} & /@ Select[Prime@ Range@ 100, PrimeQ@ # && PrimeQ[# + 22] &] // Flatten (* Michael De Vlieger, May 23 2016 *)
  • Ruby
    require 'prime'
    ary = []
    Prime.each(487447).each{|i| ary += [i, i + 22] if (i + 22).prime?}
    p ary  # Seiichi Manyama, May 22 2016

Extensions

Typo in definition edited by D. S. McNeil, Dec 10 2009
Entries verified and extended by D. S. McNeil, Dec 10 2009

A140445 List of prime pairs of form p, p + 10.

Original entry on oeis.org

3, 13, 7, 17, 13, 23, 19, 29, 31, 41, 37, 47, 43, 53, 61, 71, 73, 83, 79, 89, 97, 107, 103, 113, 127, 137, 139, 149, 157, 167, 163, 173, 181, 191, 223, 233, 229, 239, 241, 251, 271, 281, 283, 293, 307, 317, 337, 347, 349, 359, 373, 383, 379, 389, 409, 419, 421
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 26 2008

Keywords

Crossrefs

Cf. A023203 (1st bisection), A092146 (2nd bisection).
Cf. prime pairs of the form (p, p+k): A077800 (k=2), A094343 (k=4), A156274 (k=6), A156320 (k=8), this sequence (k=10), A156323 (k=12), A140446 (k=14), A272815 (k=16), A156328 (k=18), A272816 (k=20), A140447 (k=22).

Programs

  • Maple
    i: 1: for k from 1 to 1200 do if isprim (k) and isprim (k+10) then a [ i ] : = k : a [ i + 1]: = k + 10 : i = i + 2 fi od : seq (a [ n ], n=1..i-1);
  • Mathematica
    Flatten[{#,#+10}&/@Select[Prime[Range[100]],PrimeQ[#+10]&]]  (* Harvey P. Dale, Apr 11 2011 *)

Extensions

Corrected by D. S. McNeil, Dec 10 2009

A272815 Prime pairs of the form (p, p+16).

Original entry on oeis.org

3, 19, 7, 23, 13, 29, 31, 47, 37, 53, 43, 59, 67, 83, 73, 89, 97, 113, 151, 167, 157, 173, 163, 179, 181, 197, 211, 227, 223, 239, 241, 257, 277, 293, 331, 347, 337, 353, 367, 383, 373, 389, 433, 449, 463, 479, 487, 503, 541, 557, 547, 563, 571
Offset: 1

Views

Author

Vincenzo Librandi, May 07 2016

Keywords

Comments

p and p+16 are not necessarily consecutive primes: (1831, 1847) is the first pair of consecutive primes that belongs to the sequence.

Examples

			The prime pairs are (3, 19), (7, 23), (13, 29) etc.
		

Crossrefs

Cf. prime pairs of the form (p, p+k): A077800 (k=2), A094343 (k=4), A156274 (k=6), A156320 (k=8), A140445 (k=10), A156323 (k=12), A140446 (k=14), this sequence (k=16), A156328 (k=18), A272816 (k=20), A140447 (k=22).

Programs

  • Magma
    &cat [[p,p+16]: p in PrimesUpTo(1000) | IsPrime(p+16)];
  • Mathematica
    Flatten[{#, # + 16}&/@Select[Prime[Range[200]], PrimeQ[# + 16] &]]

Formula

a(2n+1) = A049488(n+1).

A272816 Prime pairs of the form (p, p+20).

Original entry on oeis.org

3, 23, 11, 31, 17, 37, 23, 43, 41, 61, 47, 67, 53, 73, 59, 79, 83, 103, 89, 109, 107, 127, 131, 151, 137, 157, 173, 193, 179, 199, 191, 211, 251, 271, 257, 277, 263, 283, 293, 313, 311, 331, 317, 337, 347, 367, 353, 373, 359, 379, 389, 409, 401, 421
Offset: 1

Views

Author

Vincenzo Librandi, May 07 2016

Keywords

Comments

p and p+20 are not necessarily consecutive primes: (887, 907) is the first pair of consecutive primes that belongs to the sequence.

Examples

			The prime pairs are (3, 23), (11, 31), (17, 37) etc.
		

Crossrefs

Cf. similar sequences listed in A272815.
Prime pairs of the form (p, p+k): A077800 (k=2), A094343 (k=4), A156274 (k=6), A156320 (k=8), A140445 (k=10), A156323 (k=12), A140446 (k=14), A272815 (k=16), A156328 (k=18), this sequence (k=20), A140447 (k=22).

Programs

  • Magma
    &cat [[p, p+20]: p in PrimesUpTo(1000) | IsPrime(p+20)];
    
  • Mathematica
    Flatten[{#, # + 20}&/@Select[Prime[Range[200]], PrimeQ[# + 20] &]]
  • Python
    from gmpy2 import is_prime
    for n in range(1000):
       if(is_prime(n) and is_prime(n+20)):
          print('{}, {}'.format(n,n+20),end=', ')
    # Soumil Mandal, May 14 2016

Formula

a(2n+1) = A153419(n+1).

Extensions

Edited by Bruno Berselli, May 12 2016

A111980 Union of pairs of consecutive primes p, q with q-p = 4.

Original entry on oeis.org

7, 11, 13, 17, 19, 23, 37, 41, 43, 47, 67, 71, 79, 83, 97, 101, 103, 107, 109, 113, 127, 131, 163, 167, 193, 197, 223, 227, 229, 233, 277, 281, 307, 311, 313, 317, 349, 353, 379, 383, 397, 401, 439, 443, 457, 461, 463, 467, 487, 491, 499, 503, 613, 617, 643
Offset: 1

Views

Author

Ray Chandler, Aug 24 2005

Keywords

Crossrefs

Essentially the same as A094343.
Union of A029710 and A031505.
Cf. A140546.

Programs

  • Mathematica
    Flatten[Select[Partition[Prime[Range[200]],2,1],#[[2]]-#[[1]]==4&]]//Union (* Harvey P. Dale, Jul 09 2024 *)

A140448 List of prime pairs of form p, p+34.

Original entry on oeis.org

3, 37, 7, 41, 13, 47, 19, 53, 37, 71, 67, 101, 73, 107, 79, 113, 97, 131, 103, 137, 139, 173, 157, 191, 163, 197, 193, 227, 199, 233, 223, 257, 229, 263, 277, 311, 283, 317, 313, 347, 349, 383, 367, 401, 397, 431, 409, 443, 433, 467, 457, 491, 487, 521, 523
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 26 2008

Keywords

Comments

The two primes p and p+34 are not necessarily adjacent.

Examples

			The pairs are (3, 37), (7, 41), (13, 47), etc.
		

Crossrefs

Extensions

Typos in definition and example corrected by D. S. McNeil, Dec 10 2009
Corrected by D. S. McNeil, Dec 10 2009

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-9 of 9 results.