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”).

A076472
Number of pairs (p,q) of successive primes with p+q<=n and gcd(p+q,n)>1.
3
0, 0, 0, 0, 1, 0, 0, 1, 0, 2, 0, 2, 0, 2, 2, 2, 0, 3, 0, 4, 2, 3, 0, 4, 1, 4, 3, 4, 0, 6, 0, 5, 4, 5, 2, 6, 0, 6, 5, 7, 0, 7, 0, 7, 7, 7, 0, 7, 1, 8, 6, 8, 0, 8, 2, 8, 6, 8, 0, 10, 0, 9, 7, 9, 4, 9, 0, 10, 7, 11, 0, 10, 0, 10, 8, 10, 1, 11, 0, 12, 8, 11, 0, 12, 4, 12, 9, 12, 0, 14, 4, 13, 10, 13, 4, 13
OFFSET
1,10
LINKS
FORMULA
a(n) = A076471(n) - A076473(n).
For n>6: a(n)=0 iff n is prime.
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)=3.
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
MATHEMATICA
Table[Count[Total/@Partition[Prime[Range[n]], 2, 1], _?(#<=n&&GCD[#, n]>1&)], {n, 100}] (* Harvey P. Dale, May 06 2018 *)
CROSSREFS
Sequence in context: A276812 A246721 A249441 * A161840 A355851 A140302
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Oct 14 2002
STATUS
approved