|
|
A005075
|
|
Sum of squares of primes = 2 mod 3 dividing n.
|
|
5
|
|
|
0, 4, 0, 4, 25, 4, 0, 4, 0, 29, 121, 4, 0, 4, 25, 4, 289, 4, 0, 29, 0, 125, 529, 4, 25, 4, 0, 4, 841, 29, 0, 4, 121, 293, 25, 4, 0, 4, 0, 29, 1681, 4, 0, 125, 25, 533, 2209, 4, 0, 29, 289, 4, 2809, 4, 146, 4, 0, 845, 3481, 29, 0, 4, 0, 4, 25, 125, 0, 293, 529, 29, 5041, 4, 0, 4, 25, 4, 121, 4, 0, 29, 0, 1685, 6889, 4, 314
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
Additive with a(p^e) = p^2 if p = 2 (mod 3), 0 otherwise.
|
|
MATHEMATICA
|
Array[DivisorSum[#, #^2 &, And[PrimeQ@ #, Mod[#, 3] == 2] &] &, 85] (* Michael De Vlieger, Jul 11 2017 *)
f[p_, e_] := If[Mod[p, 3] == 2, p^2, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
|
|
PROG
|
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k, 1])%3) == 2, p^2)); \\ Michel Marcus, Jul 11 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|