login
A391185
The sum of the divisors of n that are of the form x^2 + 2*y^2 (A002479).
4
1, 3, 4, 7, 1, 12, 1, 15, 13, 3, 12, 28, 1, 3, 4, 31, 18, 39, 20, 7, 4, 36, 1, 60, 26, 3, 40, 7, 1, 12, 1, 63, 48, 54, 1, 91, 1, 60, 4, 15, 42, 12, 44, 84, 13, 3, 1, 124, 50, 78, 72, 7, 1, 120, 12, 15, 80, 3, 60, 28, 1, 3, 13, 127, 1, 144, 68, 126, 4, 3, 1, 195, 74
OFFSET
1,2
COMMENTS
The number of these divisors is A391184(n), and the largest of them is A391186(n).
LINKS
FORMULA
a(n) = Sum_{d|n} A391183(d) * d.
Multiplicative with a(p^e) = (p^(2*(floor(e/2) + 1)) - 1)/(p^2 - 1) if p == p == 5 or 7 (mod 8), and (p^(e+1) - 1)/(p - 1) otherwise.
a(n) = A000203(n) if and only if n is not divisible by any prime in A003628.
a(n) = A035316(n) if and only if all the prime factors of n are in A003628.
a(n) = 1 if and only if n is squarefree and all its prime factors are in A003628.
EXAMPLE
a(6) = 12 since 6 has 4 divisors, 1, 2, 3 and 6, all of them are of the form x^2 + 2*y^2: 1 = 1^2 + 2*0^2, 2 = 0^2 + 2*1^2, 3 = 1^2 + 2*1^2, and 6 = 2^2 + 2*1^2, and their sum is 1 + 2 + 3 + 6 = 12.
MATHEMATICA
f[p_, e_] := If[Mod[p, 8] > 4, (p^(2*(Floor[e/2] + 1)) - 1)/(p^2 - 1), (p^(e + 1) - 1)/(p - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1]%8 > 4, (f[i, 1]^(2*(f[i, 2]\2 + 1)) - 1)/(f[i, 1]^2 - 1), (f[i, 1]^(f[i, 2] + 1) - 1)/(f[i, 1] - 1))); }
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Amiram Eldar, Dec 02 2025
STATUS
approved