This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A076471 #13 Dec 08 2024 14:18:07 %S A076471 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 A076471 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 A076471 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 A076471 Number of pairs (p,q) of successive primes with p+q<=n. %H A076471 Robert Israel, <a href="/A076471/b076471.txt">Table of n, a(n) for n = 1..10000</a> %F A076471 A056172(n)-1 <= a(n) <= A056172(n). %F A076471 a(n) = A076472(n) + A076473(n). %e A076471 Pairs (p,q) of successive primes with p+q<=27: {(2,3), (3,5), (5,7), (7,11), (11,13)}, hence a(27)=5. %p A076471 f:= proc(n) local p; %p A076471 if n <= 4 then return 0 fi; %p A076471 p:= prevprime(ceil(n/2)); %p A076471 if p + nextprime(p) <= n then numtheory:-pi(p) else numtheory:-pi(p)-1 fi %p A076471 end proc: %p A076471 map(f, [$1..100]); # _Robert Israel_, Dec 08 2024 %t A076471 With[{t=Total/@Partition[Prime[Range[100]],2,1]},Table[Count[t,_?(#<=n&)],{n,100}]] (* _Harvey P. Dale_, Apr 16 2015 *) %Y A076471 Cf. A000720, A056172, A076472, A076473. %K A076471 nonn %O A076471 1,8 %A A076471 _Reinhard Zumkeller_, Oct 14 2002