login
A356864
a(n) is the number of primes p < n such that 2*n-p and p*(2*n-p)+2*n are also prime.
2
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, 0, 3, 0, 2, 3, 0, 3, 4, 1, 1, 2, 1, 2, 3, 0, 0, 3, 1, 3, 1, 0, 5, 3, 0, 2, 1, 0, 3, 6, 0, 1, 2, 1, 1, 3, 0, 2, 2, 0, 2, 1, 1, 4, 6, 0, 2, 11, 0, 3, 3, 0, 2, 2, 0, 0, 2, 0, 4, 4, 0, 1, 3, 1, 5, 3, 0, 2, 8, 0, 2, 3, 0, 1, 5, 0, 0, 6, 1, 4, 5, 0, 3, 4, 0, 3, 1
OFFSET
1,11
COMMENTS
a(n) is the number of k such that n-k, n+k and n^2+2*n-k^2 are all prime.
If n == 1 (mod 3) then a(n) <= 1, as the only possible p is 3.
LINKS
EXAMPLE
a(11) = 2 because 3, 22-3 = 19 and 3*19+22 = 79, and 5, 22-5 = 17 and 5*17+22 = 107 are all prime.
MAPLE
f:= proc(m) local p, q, t;
p:= 1: t:= 0:
do
p:= nextprime(p);
q:= n-p;
if q <= p then return t fi;
if isprime(q) and isprime(p*q+m) then t:= t+1 fi;
od
end proc:
map(f, 2*[$1..100]);
MATHEMATICA
a[n_] := Count[Range[n - 1], _?(AllTrue[{#, 2*n - #, #*(2*n - #) + 2*n}, PrimeQ] &)]; Array[a, 100] (* Amiram Eldar, Sep 01 2022 *)
CROSSREFS
Cf. A061357.
Sequence in context: A209777 A356931 A377129 * A145677 A128229 A132013
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Sep 01 2022
STATUS
approved