cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A005072 Sum of cubes of primes = 1 mod 3 dividing n.

This page as a plain text file.
%I A005072 #20 Jun 21 2022 05:09:02
%S A005072 0,0,0,0,0,0,343,0,0,0,0,0,2197,343,0,0,0,0,6859,0,343,0,0,0,0,2197,0,
%T A005072 343,0,0,29791,0,0,0,343,0,50653,6859,2197,0,0,343,79507,0,0,0,0,0,
%U A005072 343,0,0,2197,0,0,0,343,6859,0,0,0,226981,29791,343,0,2197,0,300763,0,0,343,0,0,389017,50653,0,6859,343,2197,493039
%N A005072 Sum of cubes of primes = 1 mod 3 dividing n.
%H A005072 Antti Karttunen, <a href="/A005072/b005072.txt">Table of n, a(n) for n = 1..10001</a>
%F A005072 Additive with a(p^e) = p^3 if p = 1 (mod 3), 0 otherwise.
%t A005072 f[p_, e_] := If[Mod[p, 3] == 1, p^3, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* _Amiram Eldar_, Jun 21 2022 *)
%o A005072 (Scheme) (define (A005072 n) (if (= 1 n) 0 (+ (A000578 (if (= 1 (modulo (A020639 n) 3)) (A020639 n) 0)) (A005072 (A028234 n))))) ;; _Antti Karttunen_, Jul 09 2017
%o A005072 (PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k,1])%3) == 1, p^3)); \\ _Michel Marcus_, Jul 10 2017
%Y A005072 Cf. A000578, A005070, A005071, A005073.
%K A005072 nonn
%O A005072 1,7
%A A005072 _N. J. A. Sloane_
%E A005072 More terms from _Antti Karttunen_, Jul 09 2017