Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Dec 08 2024 17:25:25
%S 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,
%T 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,
%U 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
%N Number of pairs (p,q) of successive primes with p+q<=n and gcd(p+q,n)>1.
%H Robert Israel, <a href="/A076472/b076472.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A076471(n) - A076473(n).
%F For n>6: a(n)=0 iff n is prime.
%e 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.
%p f:= proc(n) local t,p,q,s;
%p p:= 2; t:= 0;
%p do
%p q:= p; p:= nextprime(p);
%p s:= q+p;
%p if s > n then return t fi;
%p if igcd(s,n) > 1 then t:= t+1 fi
%p od
%p end proc:
%p map(f, [$1..100]); # _Robert Israel_, Dec 08 2024
%t Table[Count[Total/@Partition[Prime[Range[n]],2,1],_?(#<=n&&GCD[#,n]>1&)],{n,100}] (* _Harvey P. Dale_, May 06 2018 *)
%Y Cf. A076471, A076473.
%K nonn,look
%O 1,10
%A _Reinhard Zumkeller_, Oct 14 2002