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.

A063713 Numbers n such that there exist primes p, q, r with n*2 = p - r = r + q (values of r are given in A063714).

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 27, 28, 30, 32, 33, 35, 36, 38, 39, 42, 43, 45, 46, 48, 50, 51, 52, 53, 54, 55, 57, 58, 60, 63, 65, 66, 67, 69, 70, 71, 72, 75, 77, 78, 80, 81, 84, 85, 87, 88, 90, 93, 96, 97, 98, 99, 100, 101, 102, 105
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 10 2001

Keywords

Examples

			10*2 = 20 = 23 - 3 = 3 + 17, A063714(7) = 3; 11*2 = 22 = 41 - 19 = 19 + 3, A063714(8) = 19 28 is missing because we have the prime sums (Goldbach): 5 + 23 = 11 + 17 and differences with primes less 28: 31 - 3 = 41 - 13 = 47 - 19; none of these have a prime in common.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local k;
      k:= 1;
      while k < 2*n do
        k:= nextprime(k);
        if isprime(2*n+k) and isprime(2*n-k) then return true fi
      od;
      false
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Oct 09 2017
  • Mathematica
    okQ[n_] := AnyTrue[Prime[Range[PrimePi[2 n - 2]]], PrimeQ[2 n + #] && PrimeQ[2 n - #]&]; Select[Range[105], okQ] (* Jean-François Alcover, Feb 12 2018 *)