login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A293271 Numbers n such that n - p and n + p are both prime for some prime p. 0
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Apart from a(1), all terms are composite.
Union of A087679 and 2*A063713. - Robert Israel, Oct 09 2017
LINKS
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 *)
PROG
(PARI) a(n) = forprime(p=1, n, i=n-p; j=n+p; if(isprime(i)&&isprime(j), n; break))
CROSSREFS
Cf. A087679, A087695, A087696, A087697 (subsequences).
Cf. A063713.
Sequence in context: A293795 A165991 A300331 * A348046 A371656 A323215
KEYWORD
nonn
AUTHOR
Gionata Neri, Oct 04 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 2 22:03 EDT 2024. Contains 374875 sequences. (Running on oeis4.)