login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
a(n) = A005063(n) - A005071(n) - 9*A079978(n). - Antti Karttunen, Jul 10 2017
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
(Scheme) (define (A005075 n) (if (= 1 n) 0 (+ (A000290 (if (= 2 (modulo (A020639 n) 3)) (A020639 n) 0)) (A005075 (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^2)); \\ Michel Marcus, Jul 11 2017
CROSSREFS
Sequence in context: A058493 A112149 A087736 * A103638 A129821 A126836
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Antti Karttunen, Jul 10 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 28 20:13 EDT 2024. Contains 375508 sequences. (Running on oeis4.)