login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = sigma_2(n) + phi(n) * sigma(n) - 2*n^2, which is A072779(n) - 2*n^2.
3

%I #22 Dec 03 2023 05:02:09

%S 0,0,0,3,0,2,0,17,7,2,0,34,0,2,2,77,0,41,0,82,2,2,0,178,21,2,82,154,0,

%T 76,0,325,2,2,2,411,0,2,2,450,0,124,0,370,188,2,0,786,43,115,2,514,0,

%U 428,2,858,2,2,0,948,0,2,356,1333,2,268,0,874,2,156,0,2047,0,2,220

%N a(n) = sigma_2(n) + phi(n) * sigma(n) - 2*n^2, which is A072779(n) - 2*n^2.

%C This sequence is interesting because (1) a(n) >= 0, with equality only when n is prime (or 1) and (2) a(n) = 2 if and only if n is the product of two distinct primes. Note for twin primes: let n = m^2 - 1, then m-1 and m+1 are twin primes if and only if a(n) = 2. Note for the Goldbach conjecture: let n = m^2 - r^2, then m-r and m+r are primes that add to 2m if and only if a(n) = 2.

%H T. D. Noe, <a href="/A072780/b072780.txt">Table of n, a(n) for n = 1..1000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DivisorFunction.html">Divisor Function</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TotientFunction.html">Totient Function</a>.

%F Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = zeta(3) + Product_{p prime} (1 - 1/(p^2*(p+1))) - 2 = A002117 + A065465 - 2 = 0.083570742884... . - _Amiram Eldar_, Dec 03 2023

%t Table[DivisorSigma[2, n]+EulerPhi[n]DivisorSigma[1, n]-2n^2, {n, 100}]

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

%Y Cf. A000010, A000203, A001157, A051709, A072779.

%Y Cf. A002117, A065465.

%K easy,nice,nonn

%O 1,4

%A _T. D. Noe_, Jul 15 2002