OFFSET
1,6
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
MATHEMATICA
a[n_] := 3*n - 2*EulerPhi[n] - DivisorSigma[1, n]; Array[a, 100] (* Amiram Eldar, Dec 04 2023 *)
PROG
(PARI) A297159(n) = (3*n - 2*eulerphi(n) - sigma(n));
(PARI) A297159(n) = -sumdiv(n, d, (d<n)*moebius(n/d)*((2*d)-sigma(d)));
(Python)
from sympy import totient, divisor_sigma
def a(n): return 3*n-2*totient(n)-divisor_sigma(n)
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Mar 02 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Antti Karttunen, Mar 02 2018
STATUS
approved