login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Cf. also A051709, A296074.
Sequence in context: A010739 A166918 A143576 * A293438 A318622 A353785
KEYWORD
sign,easy
AUTHOR
Antti Karttunen, Mar 02 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 12:53 EDT 2024. Contains 371969 sequences. (Running on oeis4.)