VOOZH about

URL: https://oeis.org/A284950

⇱ A284950 - OEIS


login
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
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
KEYWORD
nonn,look
AUTHOR
Neil Fernandez, Apr 06 2017
EXTENSIONS
Definition corrected by Robert Israel, Jul 20 2020
STATUS
approved