cp's OEIS Frontend

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.

A076473 Number of pairs (p,q) of successive primes with p+q<=n and gcd(p+q,n)=1.

This page as a plain text file.
%I A076473 #10 Dec 08 2024 17:25:36
%S A076473 0,0,0,0,0,1,1,1,2,0,2,1,3,1,1,1,3,1,4,0,2,1,4,1,4,1,2,1,5,0,6,1,2,1,
%T A076473 4,1,7,1,2,0,7,1,8,1,1,1,8,1,7,0,2,1,9,1,7,1,3,1,9,0,10,1,3,1,6,1,10,
%U A076473 1,4,0,11,1,11,1,3,1,10,1,12,0,4,1,12,1,9,1,4,1,13,0,10,1,4,1,10,1,14,1,4
%N A076473 Number of pairs (p,q) of successive primes with p+q<=n and gcd(p+q,n)=1.
%H A076473 Robert Israel, <a href="/A076473/b076473.txt">Table of n, a(n) for n = 1..10000</a>
%F A076473 a(n) = A076471(n) - A076472(n).
%e A076473 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)=2.
%p A076473 f:= proc(n) local t,p,q,s;
%p A076473   p:= 2; t:= 0;
%p A076473   do
%p A076473     q:= p; p:= nextprime(p);
%p A076473     s:= q+p;
%p A076473     if s > n then return t fi;
%p A076473     if igcd(s,n) = 1 then t:= t+1 fi
%p A076473   od
%p A076473 end proc:
%p A076473 map(f, [$1..100]); # _Robert Israel_, Dec 08 2024
%Y A076473 Cf. A000010, A076471, A076472.
%K A076473 nonn,look
%O A076473 1,9
%A A076473 _Reinhard Zumkeller_, Oct 14 2002