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.

Previous Showing 11-19 of 19 results.

A087696 Numbers n such that n + 5 and n - 5 are both prime.

Original entry on oeis.org

8, 12, 18, 24, 36, 42, 48, 66, 78, 84, 102, 108, 132, 144, 162, 168, 186, 228, 234, 246, 276, 288, 312, 342, 354, 378, 384, 414, 426, 438, 444, 462, 504, 552, 582, 612, 636, 648, 678, 696, 714, 738, 756, 792, 816, 834, 858, 882, 924, 942, 972
Offset: 1

Views

Author

Zak Seidov, Sep 27 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[5,1000],AllTrue[#+{5,-5},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 08 2014 *)
  • PARI
    isok(n) = isprime(n-5) && isprime(n+5); \\ Michel Marcus, Sep 02 2019

A087680 Numbers n such that n + 4 and n - 4 are both prime.

Original entry on oeis.org

7, 9, 15, 27, 33, 57, 63, 75, 93, 105, 135, 153, 177, 195, 237, 267, 273, 363, 393, 405, 435, 453, 483, 495, 567, 573, 597, 603, 657, 687, 705, 723, 747, 765, 825, 915, 933, 987, 1017, 1035, 1065, 1113, 1167, 1197, 1227, 1233, 1287, 1293, 1323, 1377, 1443
Offset: 1

Views

Author

Zak Seidov, Sep 27 2003

Keywords

Comments

All terms > 7 (prime) are divisible by 3. Also note that n-4 and n+4 are not necessarily consecutive primes. First case when n-4 and n+4 are consecutive primes is for n=93 with n-4=89 and n+4=97. - Zak Seidov, Apr 22 2015

Crossrefs

Programs

  • Maple
    ZL:=[]:for p from 1 to 1444 do if (isprime(p) and isprime(p+8) ) then ZL:=[op(ZL),(p+(p+8))/2]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
  • Mathematica
    f[n_]:=PrimeQ[n-4]&&PrimeQ[n+4]; lst={};Do[If[f[n],AppendTo[lst,n]],{n,3,8!,2}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 09 2009 *)
    Select[Prime[Range[250]],PrimeQ[#+8]&]+4 (* Harvey P. Dale, May 21 2023 *)

Formula

a(n) = A023202(n) + 4. - Michel Marcus, Apr 22 2015

Extensions

More terms from Ray Chandler, Oct 26 2003

A087682 Numbers n such that n + 8 and n - 8 are both prime.

Original entry on oeis.org

11, 15, 21, 39, 45, 51, 75, 81, 105, 159, 165, 171, 189, 219, 231, 249, 285, 339, 345, 375, 381, 441, 471, 495, 549, 555, 579, 585, 609, 639, 651, 669, 735, 765, 819, 831, 945, 975, 1005, 1041, 1095, 1101, 1179, 1209, 1221, 1299, 1311, 1431, 1479, 1491
Offset: 1

Views

Author

Zak Seidov, Sep 27 2003

Keywords

Crossrefs

Programs

Extensions

More terms from Ray Chandler, Oct 26 2003

A104227 Primes one less than the sum over a sexy prime pair.

Original entry on oeis.org

19, 31, 67, 79, 127, 139, 151, 199, 211, 307, 547, 619, 739, 751, 919, 1087, 1231, 1459, 1471, 1759, 1987, 2131, 2179, 2239, 2251, 2467, 2647, 2851, 2971, 3319, 3331, 3391, 3499, 3511, 3559, 3571, 3727, 3739, 4027, 4567, 4759, 5107, 5347, 5419, 5431, 6367, 6607, 6619, 7027, 7219, 7459
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 02 2005

Keywords

Comments

Primes of the form A023201(i)+A046117(i)-1 or of the form 2*A087695(j)-1.

Examples

			19=7+13-1 is a prime and one less than the sum 7+13 over the second sexy prime pair.
		

Crossrefs

Programs

  • Mathematica
    Select[2#+5&/@Select[Prime[Range[600]],PrimeQ[#+6]&],PrimeQ] (* Harvey P. Dale, Jan 04 2020 *)

Extensions

Corrected definition. Extended beyond a(7). - R. J. Mathar, Nov 26 2008

A104010 Sum of two successive sexy primes.

Original entry on oeis.org

16, 20, 28, 32, 40, 52, 68, 80, 88, 100, 112, 128, 140, 152, 172, 200, 208, 212, 220, 268, 308, 320, 340, 352, 388, 392, 452, 460, 472, 508, 520, 532, 548, 560, 620, 628, 668, 700, 712, 740, 752, 772, 872, 892, 920, 928, 1012, 1088, 1120, 1132, 1148, 1180, 1192
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 31 2005

Keywords

Crossrefs

Programs

Formula

a(n)= A023201(n)+A046117(n) = 2*A087695(n). [From R. J. Mathar, Nov 26 2008]

Extensions

20 added, 84 removed, extended by R. J. Mathar, Nov 26 2008

A144842 Numbers k such that the three numbers k+3, k-3 and k+5 are all prime.

Original entry on oeis.org

8, 14, 26, 56, 104, 134, 176, 194, 236, 266, 566, 596, 656, 824, 1016, 1226, 1286, 1484, 1604, 1616, 1874, 2084, 2336, 2546, 2966, 3254, 3326, 3464, 3536, 3764, 3914, 3926, 4016, 4214, 4256, 4646, 4796, 5006, 5276, 5474, 5654, 5846, 5864, 6266, 6356, 6566
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 22 2008

Keywords

Comments

Subset of A087695. - R. J. Mathar, Sep 24 2008

Crossrefs

Programs

  • Mathematica
    Select[Range[7000], And @@ PrimeQ[# + {-3, 3, 5}] &] (* Amiram Eldar, Apr 14 2022 *)
  • Python
    from sympy import isprime
    def ok(n): return n > 4 and isprime(n-3) and isprime(n+3) and isprime(n+5)
    print(list(filter(ok, range(6567)))) # Michael S. Branicky, Aug 14 2021

Formula

a(n) = A046138(n) + 3. - R. J. Mathar, Sep 24 2008

Extensions

Definition edited and extended by R. J. Mathar, Sep 24 2008

A164570 Primes p such that 8*p-3 and 8*p+3 are also prime numbers.

Original entry on oeis.org

2, 5, 7, 13, 47, 103, 107, 127, 163, 233, 293, 337, 383, 433, 443, 467, 503, 673, 677, 733, 797, 877, 1087, 1093, 1153, 1217, 1223, 1307, 1637, 1933, 2053, 2087, 2137, 2423, 2477, 2543, 2633, 2687, 2857, 2917, 3163, 3373, 3407, 3467, 3767, 3793, 3877
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A023229. [R. J. Mathar, Aug 26 2009]
Primes of the form A087695(k)/8. [R. J. Mathar, Aug 26 2009]

Examples

			For p=2, 8*2-3=13 and 8*2+3=19 are prime numbers, which adds p=2 to the sequence
For p=5, 8*5-3=37 and 8*5+3=43 are prime numbers, which adds p=5 to the sequence.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3000) | IsPrime(8*p-3) and IsPrime(8*p+3)]; // Vincenzo Librandi, Apr 09 2013
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[8*p-3]&&PrimeQ[8*p+3],AppendTo[lst,p]], {n,7!}];lst
    Select[Prime[Range[1000]], And@@PrimeQ/@{8 # + 3, 8 # - 3}&] (* Vincenzo Librandi, Apr 09 2013 *)
    Select[Prime[Range[1000]],AllTrue[8#+{3,-3},PrimeQ]&] (* Harvey P. Dale, May 05 2023 *)

Extensions

Comments turned into examples by R. J. Mathar, Aug 26 2009

A179485 Sums of two successive primes s such that s+-3 are primes.

Original entry on oeis.org

8, 100, 1120, 1220, 1300, 2240, 2380, 2414, 3536, 3634, 4906, 4940, 5566, 5740, 6706, 7240, 8864, 9224, 9394, 10136, 10850, 12040, 12476, 12586, 12920, 13180, 13334, 13754, 14630, 14720, 15134, 16270, 17710, 18430, 18800, 19916, 21014, 21320
Offset: 1

Views

Author

Keywords

Comments

Intersection of A001043 and A087695. - Robert Israel, Oct 25 2017

Examples

			3+5=8,8-3=5(prime),8+3=11(prime),..
		

Crossrefs

Programs

  • Maple
    q:= 2; p:= 3;
    count:= 0:
    while count < 100 do
      q:= p; p:= nextprime(p);
      s:= q+p;
      if isprime(s-3) and isprime(s+3) then
        count:= count+1; A[count]:= s;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Oct 25 2017
  • Mathematica
    q=3;Select[Table[Prime[n]+Prime[n+1],{n,7!}],PrimeQ[ #-q]&&PrimeQ[ #+q]&]
    Select[Total/@Partition[Prime[Range[1400]],2,1],AllTrue[#+{3,-3},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 04 2018 *)

A293271 Numbers n such that n - p and n + p are both prime for some prime p.

Original entry on oeis.org

5, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 30, 32, 34, 36, 39, 40, 42, 44, 45, 46, 48, 50, 54, 56, 60, 64, 66, 69, 70, 72, 76, 78, 81, 84, 86, 90, 92, 96, 99, 100, 102, 104, 105, 106, 108, 110, 111, 114, 116, 120, 126, 129, 130, 132, 134, 138, 140, 142
Offset: 1

Views

Author

Gionata Neri, Oct 04 2017

Keywords

Comments

Apart from a(1), all terms are composite.
Union of A087679 and 2*A063713. - Robert Israel, Oct 09 2017

Crossrefs

Cf. A087679, A087695, A087696, A087697 (subsequences).
Cf. A063713.

Programs

  • Maple
    filter:= proc(n) local k;
      k:= 1;
      while k < n do
        k:= nextprime(k);
        if isprime(n+k) and isprime(n-k) then return true fi
      od;
      false
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Oct 09 2017
  • Mathematica
    Select[Range@ 142, Function[n, AnyTrue[Prime@ Range@ PrimePi@ n, PrimeQ[n + {-#, #}] == {True, True} &]]] (* Michael De Vlieger, Oct 09 2017 *)
  • PARI
    a(n) = forprime(p=1, n, i=n-p; j=n+p; if(isprime(i)&&isprime(j), n; break))
Previous Showing 11-19 of 19 results.