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

A087679 Numbers k such that both k+2 and k-2 are prime.

Original entry on oeis.org

5, 9, 15, 21, 39, 45, 69, 81, 99, 105, 111, 129, 165, 195, 225, 231, 279, 309, 315, 351, 381, 399, 441, 459, 465, 489, 501, 615, 645, 675, 741, 759, 771, 825, 855, 861, 879, 885, 909, 939, 969, 1011, 1089, 1095, 1215, 1281, 1299, 1305, 1425, 1431, 1449, 1485
Offset: 1

Views

Author

Zak Seidov, Sep 27 2003

Keywords

Comments

Essentially the same as A029708: a(n) = A029708(n-1) for n>=2.
Midpoint of cousin prime pairs.
The only prime is 5. All other terms are multiples of 3. - Zak Seidov, May 19 2014

Crossrefs

Programs

  • Maple
    ZL:=[]:for p from 1 to 1485 do if (isprime(p) and isprime(p+4) ) then ZL:=[op(ZL),(p+(p+4))/2]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
  • Mathematica
    lst={};Do[If[PrimeQ[n-2]&&PrimeQ[n+2],AppendTo[lst,n]],{n,3,8!,2}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 14 2009 *)
  • PARI
    s=[]; for(n=1, 2000, if(isprime(n-2) && isprime(n+2), s=concat(s, n))); s \\ Colin Barker, May 19 2014
    
  • PARI
    is_A087679(n)={isprime(n-2) && isprime(n+2)} \\ For numbers >> 10^12 one should add conditions {n%6==3 && ... || n==5} or consider only such numbers congruent to 3 (mod 6). - M. F. Hasler, Apr 05 2017

Formula

a(n) = (A023200(n) + A046132(n))/2 = A023200(n) + 2 = A046132(n) - 2.
a(n+1) = A056956(n)*6 + 3 = A157834(n)*3; a(n) = A088762(n)*2 + 1. - M. F. Hasler, Apr 05 2017

Extensions

More terms from Ray Chandler, Oct 26 2003

A088764 a(n) = (A087680(n)-1)/2.

Original entry on oeis.org

3, 4, 7, 13, 16, 28, 31, 37, 46, 52, 67, 76, 88, 97, 118, 133, 136, 181, 196, 202, 217, 226, 241, 247, 283, 286, 298, 301, 328, 343, 352, 361, 373, 382, 412, 457, 466, 493, 508, 517, 532, 556, 583, 598, 613, 616, 643, 646, 661, 688, 721, 727, 742, 763, 781, 787
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Crossrefs

Programs

  • Magma
    [(n-1)/2: n in [2..2000] |IsPrime(n+4) and IsPrime(n-4)]; // Vincenzo Librandi, May 19 2017
  • Mathematica
    f[n_]:=PrimeQ[n - 4] && PrimeQ[n + 4]; lst={}; Do[If[f[n], AppendTo[lst, (n - 1) / 2]], {n, 3, 7!, 2}]; lst (* Vincenzo Librandi, May 19 2017 *)
    (#-1)/2&/@(Select[Prime[Range[250]],PrimeQ[#+8]&]+4) (* Harvey P. Dale, May 21 2023 *)

A088766 a(n) = (A087681(n)-1)/2.

Original entry on oeis.org

5, 6, 8, 11, 12, 17, 18, 23, 26, 32, 33, 36, 38, 47, 51, 53, 66, 71, 72, 78, 86, 92, 93, 102, 108, 116, 117, 122, 128, 131, 137, 138, 143, 171, 176, 186, 197, 201, 207, 212, 213, 218, 227, 236, 242, 246, 248, 257, 281, 296, 303, 306, 312, 318, 323, 326, 333, 366
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Comments

Numbers k such that 2*k + 1 - 6 and 2*k + 1 + 6 are sexy primes. [Jonathan Vos Post, Feb 14 2011]

Examples

			1002 is in the sequence because 2*1002 + 1 - 6 = 1999 is prime, and 2*1002 + 1 + 6 = 2011 is prime.
		

Crossrefs

Programs

  • Magma
    [n-1: n in [3..400] |IsPrime(2*n+5) and IsPrime(2*n-7)]; // Vincenzo Librandi, May 20 2017
  • Mathematica
    Select[Range[3, 1000], PrimeQ[2 # + 5] && PrimeQ[2 # - 7] &] - 1 (* Vincenzo Librandi, May 20 2017 *)

Formula

{k such that 2*k + 1 - 6 is in A023201} = {k such that 2*k + 1 + 6 is in A046117}.

A088768 a(n) = (A087682(n)-1)/2.

Original entry on oeis.org

5, 7, 10, 19, 22, 25, 37, 40, 52, 79, 82, 85, 94, 109, 115, 124, 142, 169, 172, 187, 190, 220, 235, 247, 274, 277, 289, 292, 304, 319, 325, 334, 367, 382, 409, 415, 472, 487, 502, 520, 547, 550, 589, 604, 610, 649, 655, 715, 739, 745, 775, 787, 802, 814, 850
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Crossrefs

Programs

  • Magma
    [(n-1)/2: n in [6..2000] |IsPrime(n+8) and IsPrime(n-8)]; // Vincenzo Librandi, May 20 2017
  • Mathematica
    Select[Range[6, 2000], PrimeQ[2 # + 7] && PrimeQ[2 # - 9] &] - 1 (* Vincenzo Librandi, May 20 2017 *)

A088770 a(n) = (A087683(n)-1)/2.

Original entry on oeis.org

6, 10, 13, 16, 25, 28, 31, 34, 46, 49, 58, 70, 73, 91, 94, 100, 130, 133, 136, 151, 160, 163, 178, 181, 184, 199, 205, 214, 226, 238, 244, 256, 265, 283, 298, 301, 304, 325, 331, 364, 409, 424, 433, 436, 448, 478, 490, 493, 511, 514, 520, 529, 553, 556, 559
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Crossrefs

Programs

  • Magma
    [(n-1)/2: n in [8..2000] |IsPrime(n+10) and IsPrime(n-10)]; // Vincenzo Librandi, May 22 2017
  • Mathematica
    Rest[f[n_]:=PrimeQ[n - 10] && PrimeQ[n + 10]; lst={}; Do[If[f[n], AppendTo[lst, (n - 1) / 2]], {n, 5, 7!, 2}]; lst] (* Vincenzo Librandi, May 22 2017 *)

A111981 Numbers n such that 2n-1 and 2n+3 are consecutive primes.

Original entry on oeis.org

4, 7, 10, 19, 22, 34, 40, 49, 52, 55, 64, 82, 97, 112, 115, 139, 154, 157, 175, 190, 199, 220, 229, 232, 244, 250, 307, 322, 337, 370, 379, 385, 412, 427, 430, 439, 442, 454, 469, 484, 505, 544, 547, 607, 640, 649, 652, 712, 715, 724, 742, 745, 775, 784, 790
Offset: 1

Views

Author

Ray Chandler, Aug 24 2005

Keywords

Crossrefs

Essentially the same as A088762.

Formula

a(n) = (A029708(n)-1)/2 = (A029710(n)+1)/2 = (A031505(n)-3)/2.
Showing 1-6 of 6 results.