login
Numbers of prime pairs (p,q), p<=q, such that (p+q) divides n.
1

%I #14 Oct 19 2023 07:37:28

%S 0,0,0,1,1,1,1,2,1,3,0,3,1,3,2,4,0,4,1,6,2,3,0,7,2,4,1,6,0,8,1,6,1,4,

%T 2,10,0,3,2,10,0,9,1,7,4,4,0,14,2,8,0,8,0,9,2,10,1,4,0,18,1,4,4,11,2,

%U 11,0,7,1,11,0,20,1,5,4,9,1,13,0,16,2,5,0,21,2,6,0,12,0,21,3,9,1,5,2,23,0,7

%N Numbers of prime pairs (p,q), p<=q, such that (p+q) divides n.

%H Robert Israel, <a href="/A079055/b079055.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Sum_{d|n} A061358(d). - _Robert Israel_, Oct 17 2023

%p N:= 100: # for a(1)..a(N)

%p P:= select(isprime,[2,seq(i,i=3..N,2)]): nP:= nops(P):

%p V:= Vector(N):

%p for i from 1 to nP do

%p for j from i to nP do

%p v:= P[i]+P[j];

%p J:= [seq(t,t=v..N,v)];

%p V[J]:= V[J] +~ 1

%p od od:

%p convert(V,list); # _Robert Israel_, Oct 17 2023

%o (PARI) a(n)=sum(i=1,n,sum(j=1,i,if(n%(prime(i)+prime(j)),0,1)))

%Y Cf. A061358.

%K nonn,look

%O 1,8

%A _Benoit Cloitre_, Feb 02 2003