login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = 1 if n and d(n) are coprime, 0 otherwise. Here d(n) is the number of divisors of n, A000005.
6

%I #11 Jul 14 2021 17:12:25

%S 1,0,1,1,1,0,1,0,0,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,

%T 1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,0,1,0,

%U 1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,0,1,0,1

%N a(n) = 1 if n and d(n) are coprime, 0 otherwise. Here d(n) is the number of divisors of n, A000005.

%C Equally, a(n) = 1 if and only if n and A049820(n) are coprime.

%C Characteristic function of A046642.

%H Antti Karttunen, <a href="/A322980/b322980.txt">Table of n, a(n) for n = 1..100000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F a(n) = [A009191(n)==1], where [ ] is the Iverson bracket, and A009191(n) = gcd(n,A000005(n)).

%t Table[If[CoprimeQ[n,DivisorSigma[0,n]],1,0],{n,120}] (* _Harvey P. Dale_, Jul 14 2021 *)

%o (PARI) A322980(n) = (1==gcd(n,numdiv(n)));

%Y Cf. A000005, A009191, A046642, A049820, A322974, A323073.

%K nonn

%O 1

%A _Antti Karttunen_, Jan 05 2019