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

A063714 Values of r occurring in A063713.

Original entry on oeis.org

3, 3, 5, 3, 3, 5, 3, 19, 5, 3, 7, 29, 3, 5, 3, 5, 3, 43, 5, 3, 7, 3, 7, 3, 5, 3, 11, 3, 5, 5, 3, 7, 89, 7, 3, 5, 3, 3, 5, 3, 13, 113, 7, 13, 127, 5, 3, 11, 137, 139, 5, 13, 3, 7, 3, 5, 5, 3, 7, 3, 13, 5, 19, 3, 3, 31, 197, 199, 7, 13, 17, 11, 3, 5, 3, 229, 5, 3, 11, 5, 11, 3, 19, 3, 7, 3, 7
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 10 2001

Keywords

Comments

This is not a mere union of A002373 and A020483 because of the minimality property of these sequences.

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
    k:= 2;
      while k < 2*n do
       k:= nextprime(k);
        if isprime(2*n+k) and isprime(2*n-k) then return k fi
      od;
      NULL
    end proc:
    map(f, [$1..400]); # Robert Israel, Oct 09 2017
  • Mathematica
    f[n_] := {AnyTrue[Prime[Range[PrimePi[2n-2]]], (r = #; PrimeQ[2n+r] && PrimeQ[2n-r])&], r}; Select[f /@ Range[200], #[[1]] =!= False &][[All, 2]] (* Jean-François Alcover, Feb 14 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))
Showing 1-2 of 2 results.