VOOZH about

URL: https://oeis.org/A076473

⇱ A076473 - OEIS


login
A076473
Number of pairs (p,q) of successive primes with p+q<=n and gcd(p+q,n)=1.
3
0, 0, 0, 0, 0, 1, 1, 1, 2, 0, 2, 1, 3, 1, 1, 1, 3, 1, 4, 0, 2, 1, 4, 1, 4, 1, 2, 1, 5, 0, 6, 1, 2, 1, 4, 1, 7, 1, 2, 0, 7, 1, 8, 1, 1, 1, 8, 1, 7, 0, 2, 1, 9, 1, 7, 1, 3, 1, 9, 0, 10, 1, 3, 1, 6, 1, 10, 1, 4, 0, 11, 1, 11, 1, 3, 1, 10, 1, 12, 0, 4, 1, 12, 1, 9, 1, 4, 1, 13, 0, 10, 1, 4, 1, 10, 1, 14, 1, 4
OFFSET
1,9
LINKS
FORMULA
a(n) = A076471(n) - A076472(n).
EXAMPLE
n=27: gcd(2+3,27)=1, gcd(3+5,27)=1, gcd(5+7,27)=3, gcd(7+11,27)=9, gcd(11+13,27)=3, hence a(27)=2.
MAPLE
f:= proc(n) local t, p, q, s;
p:= 2; t:= 0;
do
q:= p; p:= nextprime(p);
s:= q+p;
if s > n then return t fi;
if igcd(s, n) = 1 then t:= t+1 fi
od
end proc:
map(f, [$1..100]); # Robert Israel, Dec 08 2024
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Oct 14 2002
STATUS
approved