login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077150 Number of composite numbers between n and 2n that are coprime to n. 2

%I #15 Feb 14 2015 09:37:20

%S 0,0,1,0,3,0,4,2,3,0,7,0,9,3,4,3,12,2,14,4,7,4,17,2,14,6,11,5,22,1,23,

%T 9,13,8,16,3,27,9,15,6,31,2,33,11,14,12,37,7,32,10,21,12,41,6,27,11,

%U 22,14,45,3,48,18,24,19,35,6,53,19,30,9,56,10,59,23,26

%N Number of composite numbers between n and 2n that are coprime to n.

%C It can be proved that 12 is the largest number n such that a(n) = 0.

%H Charles R Greathouse IV, <a href="/A077150/b077150.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = phi(n) + Pi(n) - Pi(2n). - _Charles R Greathouse IV_, May 18 2011

%e a(5) = 3 as there are 3 coprime (to 5) composite numbers between 5 and 10, i.e., 6, 8 and 9.

%p A077150 := proc(n) local k,s: s:=0: for k from n+1 to 2*n-1 do if(not isprime(k) and gcd(k,n)=1)then s:=s+1: fi: od: return s: end: seq(A077150(n),n=1..100); # _Nathaniel Johnston_, May 18 2011

%o (PARI) for(k=1,100,s=0:for(n=k+1,2*k-1,if(!isprime(n),if(gcd(n,k)==1,s=s+1))):print1(s","))

%o (PARI) a(n)=eulerphi(n)+primepi(n)-primepi(2*n) \\ _Charles R Greathouse IV_, May 18 2011

%K nonn,easy

%O 1,5

%A _Amarnath Murthy_, Oct 30 2002

%E More terms from _Ralf Stephan_, Mar 18 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 12:49 EDT 2024. Contains 372196 sequences. (Running on oeis4.)