login
A005076
Sum of cubes of primes = 2 mod 3 dividing n.
5
0, 8, 0, 8, 125, 8, 0, 8, 0, 133, 1331, 8, 0, 8, 125, 8, 4913, 8, 0, 133, 0, 1339, 12167, 8, 125, 8, 0, 8, 24389, 133, 0, 8, 1331, 4921, 125, 8, 0, 8, 0, 133, 68921, 8, 0, 1339, 125, 12175, 103823, 8, 0, 133, 4913, 8, 148877, 8, 1456, 8, 0, 24397, 205379, 133, 0, 8, 0, 8, 125, 1339, 0, 4921, 12167, 133, 357911
OFFSET
1,2
LINKS
FORMULA
Additive with a(p^e) = p^3 if p = 2 (mod 3), 0 otherwise.
a(n) = A005064(n) - A005072(n) - 27*A079978(n). - Antti Karttunen, Jul 10 2017
MATHEMATICA
Array[DivisorSum[#, #^3 &, And[PrimeQ@ #, Mod[#, 3] == 2] &] &, 71] (* Michael De Vlieger, Jul 11 2017 *)
f[p_, e_] := If[Mod[p, 3] == 2, p^3, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
PROG
(Scheme) (define (A005076 n) (if (= 1 n) 0 (+ (A000578 (if (= 2 (modulo (A020639 n) 3)) (A020639 n) 0)) (A005076 (A028234 n))))) ;; Antti Karttunen, Jul 10 2017
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k, 1])%3) == 2, p^3)); \\ Michel Marcus, Jul 11 2017
KEYWORD
nonn
EXTENSIONS
More terms from Antti Karttunen, Jul 10 2017
STATUS
approved