login

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

a(n) = n - gcd(n - 1, phi(n)).
4

%I #11 Sep 23 2018 21:32:06

%S 0,1,1,3,1,5,1,7,7,9,1,11,1,13,13,15,1,17,1,19,17,21,1,23,21,25,25,25,

%T 1,29,1,31,29,33,33,35,1,37,37,39,1,41,1,43,41,45,1,47,43,49,49,49,1,

%U 53,53,55,53,57,1,59,1,61,61,63,49,61,1,67,65,67,1,71,1,73,73,73,73,77,1,79,79,81,1,83,81,85,85,87,1,89,73

%N a(n) = n - gcd(n - 1, phi(n)).

%C a(n) = n-1 for n in A209211.

%H Antti Karttunen, <a href="/A318827/b318827.txt">Table of n, a(n) for n = 1..65537</a>

%F a(n) = n - A049559(n) = n - gcd(n - 1, phi(n)).

%F a(n) = A051953(n) + A318830(n).

%F a(p) = 1 for p prime.

%t Array[# - GCD[# - 1, EulerPhi[#]] &, 100] (* _Alonso del Arte_, Sep 09 2018 *)

%o (PARI) A318827(n) = (n-gcd(eulerphi(n), n-1));

%Y Cf. A000010, A051953, A049559, A209211, A318828, A318829, A318830.

%K nonn

%O 1,4

%A _Antti Karttunen_, Sep 09 2018