login
A297159
a(n) = 3*n - 2*phi(n) - sigma(n); Difference between the deficiency of n and its Moebius-transform.
7
0, 1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 0, 1, 6, 5, 1, 1, 3, 1, 2, 7, 10, 1, -4, 4, 12, 5, 4, 1, 2, 1, 1, 11, 16, 9, -7, 1, 18, 13, -2, 1, 6, 1, 8, 9, 22, 1, -12, 6, 17, 17, 10, 1, 6, 13, 0, 19, 28, 1, -20, 1, 30, 13, 1, 15, 14, 1, 14, 23, 18, 1, -27, 1, 36, 21, 16, 15, 18, 1, -10, 14, 40, 1, -20, 19, 42, 29, 4, 1, -12, 17, 20, 31, 46, 21, -28, 1, 39, 21, 3, 1, 26
OFFSET
1,6
LINKS
FORMULA
a(n) = A033879(n) - A083254(n) = 3*n - 2*A000010(n) - A000203(n).
a(n) = -Sum_{d|n, d<n} A008683(n/d)*A033879(d).
Sum_{k=1..n} a(k) = (3/2 - 6/Pi^2 - Pi^2/12) * n^2 + O(n*log(n)). - Amiram Eldar, Dec 04 2023
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