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.

A005071 Sum of squares of primes = 1 mod 3 dividing n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 169, 49, 0, 0, 0, 0, 361, 0, 49, 0, 0, 0, 0, 169, 0, 49, 0, 0, 961, 0, 0, 0, 49, 0, 1369, 361, 169, 0, 0, 49, 1849, 0, 0, 0, 0, 0, 49, 0, 0, 169, 0, 0, 0, 49, 361, 0, 0, 0, 3721, 961, 49, 0, 169, 0, 4489, 0, 0, 49, 0, 0, 5329, 1369, 0, 361, 49, 169, 6241, 0, 0, 0, 0, 49, 0, 1849, 0, 0, 0, 0, 218
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{sp=Select[Prime[Range[100]],Mod[#,3]==1&]},Table[Total[ Select[ sp, Divisible[ n,#]&]^2],{n,70}]] (* Harvey P. Dale, Dec 19 2014 *)
    f[p_, e_] := If[Mod[p, 3] == 1, p^2, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
  • Scheme
    (define (A005071 n) (if (= 1 n) 0 (+ (A000290 (if (= 1 (modulo (A020639 n) 3)) (A020639 n) 0)) (A005071 (A028234 n))))) ;; Antti Karttunen, Jul 09 2017

Formula

Additive with a(p^e) = p^2 if p = 1 (mod 3), 0 otherwise.

Extensions

More terms from Antti Karttunen, Jul 09 2017