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”).

A320059
Sum of divisors of n^2 that do not divide n.
2
0, 4, 9, 24, 25, 79, 49, 112, 108, 199, 121, 375, 169, 375, 379, 480, 289, 808, 361, 919, 709, 895, 529, 1591, 750, 1239, 1053, 1711, 841, 2749, 961, 1984, 1681, 2095, 1719, 3660, 1369, 2607, 2323, 3847, 1681, 5091, 1849, 4039, 3673, 3799, 2209, 6519, 2744, 5374
OFFSET
1,2
COMMENTS
sigma(n^2) is always odd, so this sequence has the opposite parity from sigma(n): even if n is a square or twice a square, odd otherwise.
FORMULA
a(n) = sigma(n^2) - sigma(n).
a(n) = A065764(n) - A000203(n).
a(n) = n^2 iff n is prime. - Altug Alkan, Oct 04 2018
MAPLE
map(n -> numtheory:-sigma(n^2)-numtheory:-sigma(n), [$1..100]); # Robert Israel, Oct 04 2018
MATHEMATICA
Table[DivisorSigma[1, n^2] - DivisorSigma[1, n], {n, 70}] (* Vincenzo Librandi, Oct 05 2018 *)
PROG
(PARI) a(n) = sigma(n^2)-sigma(n)
(Magma) [DivisorSigma(1, n^2) - DivisorSigma(1, n): n in [1..70]]; // Vincenzo Librandi, Oct 05 2018
(Python)
from __future__ import division
from sympy import factorint
def A320059(n):
c1, c2 = 1, 1
for p, a in factorint(n).items():
c1 *= (p**(2*a+1)-1)//(p-1)
c2 *= (p**(a+1)-1)//(p-1)
return c1-c2 # Chai Wah Wu, Oct 05 2018
CROSSREFS
KEYWORD
nonn,look
AUTHOR
STATUS
approved