Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
a(n) = 1 if gcd(n, phi(n)) == 1 otherwise 0.
4

%I #33 Jan 20 2024 15:57:56

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

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

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

%N a(n) = 1 if gcd(n, phi(n)) == 1 otherwise 0.

%C Characteristic function of A003277. - _Iain Fox_, Dec 25 2017

%H Seiichi Manyama, <a href="/A297086/b297086.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TotientFunction.html">Totient Function</a>

%F For even n > 2, a(n) = 0. - _Iain Fox_, Dec 25 2017

%F If n is in A013929 then a(n) = 0. - _David A. Corneth_, Dec 25 2017

%F a(n) = [gcd(n,phi(n)) = 1], where [ ] is the Iverson Bracket. - _Wesley Ivan Hurt_, Jan 20 2024

%e gcd(5, phi(5)) = gcd(5, 4) = 1, so a(5) = 1.

%e gcd(6, phi(6)) = gcd(6, 2) = 2, so a(6) = 0.

%t Table[KroneckerDelta[GCD[n, EulerPhi[n]], 1], {n, 100}] (* _Wesley Ivan Hurt_, Jan 20 2024 *)

%o (PARI) {a(n) = gcd(n, eulerphi(n))==1}

%Y Cf. A000010 (phi), A003277, A013929, A061091.

%K nonn,easy

%O 1

%A _Seiichi Manyama_, Dec 25 2017