The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A051709 a(n) = sigma(n) + phi(n) - 2n. 17

%I #58 Dec 03 2023 05:03:18

%S 0,0,0,1,0,2,0,3,1,2,0,8,0,2,2,7,0,9,0,10,2,2,0,20,1,2,4,12,0,20,0,15,

%T 2,2,2,31,0,2,2,26,0,24,0,16,12,2,0,44,1,13,2,18,0,30,2,32,2,2,0,64,0,

%U 2,14,31,2,32,0,22,2,28,0,75,0,2,14,24,2,36,0

%N a(n) = sigma(n) + phi(n) - 2n.

%C Sigma is the sum of divisors (A000203), and phi is the Euler totient function (A000010). - _Michael B. Porter_, Jul 05 2013

%C Because sigma and phi are multiplicative functions, it is easy to show that (1) if a(n)=0, then n is prime or 1 and (2) if a(n)=2, then n is the product of two distinct prime numbers. Note that a(n) is the n-th term of the Dirichlet series whose generating function is given below. Using the generating function, it is theoretically possible to compute a(n). Hence a(n)=0 could be used as a primality test and a(n)=2 could be used as a test for membership in P2 (A006881). - _T. D. Noe_, Aug 01 2002

%C It appears that a(n) - A002033(n) = zeta(s-1) * (zeta(s) - 2 + 1/zeta(s)) + 1/(zeta(s)-2). - _Eric Desbiaux_, Jul 04 2013

%C a(n) = 1 if and only if n = prime(k)^2 (n is in A001248). It seems that a(n) = k has only finitely many solutions for k >= 3. - _Jianing Song_, Jun 27 2021

%H Antti Karttunen, <a href="/A051709/b051709.txt">Table of n, a(n) for n = 1..65537</a> (First 1000 terms from T. D. Noe.)

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_076.htm">Puzzle 76. z(n)=sigma(n) + phi(n) - 2n</a>, The Prime Puzzles and Problems Connection.

%F Dirichlet g.f.: zeta(s-1) * (zeta(s) - 2 + 1/zeta(s)). - _T. D. Noe_, Aug 01 2002

%F From _Antti Karttunen_, Mar 02 2018: (Start)

%F a(n) = A001065(n) - A051953(n). [Difference between the sum of proper divisors of n and their Moebius-transform.]

%F a(n) = -Sum_{d|n, d<n} A008683(n/d)*A001065(d). (End)

%F Sum_{k=1..n} a(k) = (3/(Pi^2) + Pi^2/12 - 1) * n^2 + O(n*log(n)). - _Amiram Eldar_, Dec 03 2023

%e a(5) = sigma(5) + phi(5) - 2*5 = 6 + 4 - 10 = 0.

%t Table[DivisorSigma[1,n]+EulerPhi[n]-2n,{n,80}] (* _Harvey P. Dale_, Apr 08 2015 *)

%o (PARI) a(n)=sigma(n)+eulerphi(n)-2*n \\ _Charles R Greathouse IV_, Jul 05 2013

%o (PARI) A051709(n) = -sumdiv(n,d,(d<n)*moebius(n/d)*(sigma(d)-d)); \\ _Antti Karttunen_, Mar 02 2018

%Y Cf. A000010, A000203, A001065, A001248, A005843, A006881, A051612, A051953, A065387, A072780, A228498 (= a(n^2)), A297159, A324048, A344994, A344995, A344996, A345048, A345054.

%Y Cf. A278373 (range of this sequence), A056996 (numbers not present).

%Y Cf. also A344753, A345001 (analogous sequences).

%K nonn

%O 1,6

%A _Jud McCranie_ and _Carlos Rivera_

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 May 15 13:23 EDT 2024. Contains 372540 sequences. (Running on oeis4.)