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!)
A284950 Number of primes p <= n such that 2*n-p and 2*n+p are prime. 2
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 0, 3, 0, 1, 3, 0, 1, 3, 1, 0, 3, 1, 0, 3, 1, 0, 5, 0, 1, 4, 0, 1, 3, 0, 1, 4, 0, 0, 4, 1, 0, 6, 0, 0, 4, 0, 1, 2, 1, 1, 4, 1, 0, 4, 0, 0, 9, 0, 0, 5, 0, 0, 5, 1, 0, 4, 0, 0, 5, 0, 0, 6, 0, 1, 5, 0, 1, 5, 0, 0, 7, 1, 0, 5, 1, 0, 7, 0, 0, 6, 0, 0, 4, 1, 1, 4, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,12
COMMENTS
If n is not divisible by 3, a(n)<=1, as the only possible p is 3. - Robert Israel, Jul 20 2020
LINKS
EXAMPLE
a(5) is 1, because of all the pairs of primes p1 <= p2 which sum to 5*2=10, namely {3,7} and {5,5}, only (3,7) has p1+10 prime.
MAPLE
f:= proc(n) local p1, p2, t;
t:= 0: p1:= 2:
do
p1:= nextprime(p1);
if p1 > n then return t fi;
if isprime(p1+2*n) and isprime(2*n-p1) then
t:= t+1
fi
od
end proc:
map(f, [$1..1000]); # Robert Israel, Jul 20 2020
MATHEMATICA
For[i = 1, i < 1001, i++,
ee = 2*i;
a = 0;
For[j = 3, j < ee/2, j += 2,
If[PrimeQ[j] == True && PrimeQ[ee - j] == True,
If[PrimeQ[ee + j] == True, a += 1, a = a]]];
Print[ee, " ", a]]
CROSSREFS
Sequence in context: A187616 A217262 A260616 * A308298 A364106 A364033
KEYWORD
nonn,look
AUTHOR
Neil Fernandez, Apr 06 2017
EXTENSIONS
Definition corrected by Robert Israel, Jul 20 2020
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 July 22 02:43 EDT 2024. Contains 374479 sequences. (Running on oeis4.)