login
Number of pairs (p,q) of successive primes with p+q<=n.
2

%I #5 Apr 16 2015 11:43:19

%S 0,0,0,0,1,1,1,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,

%T 6,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,

%U 10,10,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,13,13,13,13,13,13

%N Number of pairs (p,q) of successive primes with p+q<=n.

%C A056172(n)-1 <= a(n) <= A056172(n);

%C a(n) = A076472(n) + A076473(n).

%e Pairs (p,q) of successive primes with p+q<=27: {(2,3), (3,5), (5,7), (7,11), (11,13)}, hence a(27)=5.

%t With[{t=Total/@Partition[Prime[Range[100]],2,1]},Table[Count[t,_?(#<=n&)],{n,100}]] (* _Harvey P. Dale_, Apr 16 2015 *)

%Y Cf. A000720.

%K nonn

%O 1,8

%A _Reinhard Zumkeller_, Oct 14 2002