login
A318827
a(n) = n - gcd(n - 1, phi(n)).
4
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, 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, 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
OFFSET
1,4
COMMENTS
a(n) = n-1 for n in A209211.
LINKS
FORMULA
a(n) = n - A049559(n) = n - gcd(n - 1, phi(n)).
a(n) = A051953(n) + A318830(n).
a(p) = 1 for p prime.
MATHEMATICA
Array[# - GCD[# - 1, EulerPhi[#]] &, 100] (* Alonso del Arte, Sep 09 2018 *)
PROG
(PARI) A318827(n) = (n-gcd(eulerphi(n), n-1));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 09 2018
STATUS
approved