login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = the number of positive divisors of n which are coprime to d(n), where d(n) = the number of positive divisors of n.
2

%I #12 Feb 03 2019 07:05:49

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

%T 4,3,2,2,4,2,2,4,2,2,2,2,2,2,3,3,4,2,2,4,4,2,4,2,2,2,2,2,2,7,4,4,2,2,

%U 4,4,2,1,2,2,3,2,4,4,2,1,5,2,2,2,4,2,4,2,2,2,4,2,4,2,4,1,2,3,2,9,2,4,2,2,8

%N a(n) = the number of positive divisors of n which are coprime to d(n), where d(n) = the number of positive divisors of n.

%H Harvey P. Dale, <a href="/A128830/b128830.txt">Table of n, a(n) for n = 1..1000</a>

%e The 6 positive divisors of 20 are 1,2,4,5,10,20. Of these, only 1 and 5 are coprime to d(20) = 6. So a(20) = 2.

%p with(numtheory): a:=proc(n) local div,ct,i: div:=divisors(n): ct:=0: for i from 1 to tau(n) do if igcd(div[i],tau(n))=1 then ct:=ct+1 else ct:=ct: fi od: ct; end: seq(a(n),n=1..140); # _Emeric Deutsch_, Apr 14 2007

%t cpd[n_]:=Module[{ds=DivisorSigma[0,n]},Count[Divisors[n],_?(CoprimeQ[ #,ds]&)]]; Array[cpd,110] (* _Harvey P. Dale_, Apr 21 2012 *)

%K nonn

%O 1,3

%A _Leroy Quet_, Apr 13 2007

%E More terms from _Emeric Deutsch_, Apr 14 2007