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


(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A241006 Number of positive numbers <n that are coprime to all anti-divisors of n. 1

%I #10 Aug 07 2014 10:42:03

%S 1,1,2,1,3,1,4,3,2,2,5,3,5,4,9,2,4,5,6,6,6,6,10,5,8,6,5,8,8,9,12,7,10,

%T 7,12,9,8,9,13,13,9,9,14,10,11,10,18,13,13,16,12,12,18,13,18,13,13,14,

%U 12,17,16,15,41,15,16,14,18,22,15,18,16,16,22,20,24,15,19,25,21

%N Number of positive numbers <n that are coprime to all anti-divisors of n.

%C Note that a different sequence could be defined by "Number of positive numbers < n that do not have any anti-divisor as a factor," which gives A066452. Consider for example n=10 with anti-divisors {3,4,7} and the number 2. 2 is not coprime to the anti-divisor 4 and does not contribute to a(10), whereas 2 does not have 4 as a factor and contributes to A066452.

%e 10 has anti-divisors {3,4,7}. The positive integers that are <10 and coprime to

%e all of them are {1,5}, so a(10)=2. The integers 2, 3, 4, 6, 7, 8 and 9

%e are not coprime to all of {3,4,7} and do not contribute to the count.

%p A241006 :=proc(n)

%p local a,ad,i,isco ;

%p a := 0 ;

%p ad := antidivisors(n) ; # implemented in A066272

%p for i from 1 to n-1 do

%p isco := true;

%p for adiv in ad do

%p if igcd(adiv,i) > 1 then

%p isco := false;

%p break;

%p end if;

%p end do:

%p if isco then

%p a := a+1 ;

%p end if;

%p end do:

%p a ;

%p end proc:

%Y Cf. A066452.

%K nonn

%O 2,3

%A _R. J. Mathar_, Aug 07 2014

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 February 22 09:09 EST 2024. Contains 370250 sequences. (Running on oeis4.)