login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A005084
Sum of cubes of primes = 3 mod 4 dividing n.
6
0, 0, 27, 0, 0, 27, 343, 0, 27, 0, 1331, 27, 0, 343, 27, 0, 0, 27, 6859, 0, 370, 1331, 12167, 27, 0, 0, 27, 343, 0, 27, 29791, 0, 1358, 0, 343, 27, 0, 6859, 27, 0, 0, 370, 79507, 1331, 27, 12167, 103823, 27, 343, 0, 27, 0, 0, 27, 1331, 343, 6886, 0, 205379, 27, 0, 29791, 370, 0, 0, 1358, 300763, 0, 12194, 343, 357911
OFFSET
1,3
LINKS
FORMULA
Additive with a(p^e) = p^3 if p = 3 (mod 4), 0 otherwise.
a(n) = A005064(n) - A005080(n) - 8*A059841(n). - Antti Karttunen, Jul 11 2017
MATHEMATICA
Array[DivisorSum[#, #^3 &, And[PrimeQ@ #, Mod[#, 4] == 3] &] &, 71] (* Michael De Vlieger, Jul 11 2017 *)
f[p_, e_] := If[Mod[p, 4] == 3, p^3, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
PROG
(Scheme) (define (A005084 n) (if (= 1 n) 0 (+ (if (= 3 (modulo (A020639 n) 4)) (A000578 (A020639 n)) 0) (A005084 (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^3)); \\ Michel Marcus, Jul 11 2017
KEYWORD
nonn
EXTENSIONS
More terms from Antti Karttunen, Jul 11 2017
STATUS
approved