OFFSET
1,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
Additive with a(p^e) = p^2 if p = 3 (mod 4), 0 otherwise.
MATHEMATICA
Array[DivisorSum[#, #^2 &, And[PrimeQ@ #, Mod[#, 4] == 3] &] &, 84] (* Michael De Vlieger, Jul 11 2017 *)
f[p_, e_] := If[Mod[p, 4] == 3, p^2, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
PROG
(Scheme) (define (A005083 n) (if (= 1 n) 0 (+ (if (= 3 (modulo (A020639 n) 4)) (A000290 (A020639 n)) 0) (A005083 (A028234 n))))) ;; Antti Karttunen, Jul 11 2017
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k, 1])%4) == 3, p^2)); \\ Michel Marcus, Jul 11 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Antti Karttunen, Jul 11 2017
STATUS
approved