login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

  NODES
orte 1
see 1
Story 1