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!)
A005083 Sum of squares of primes = 3 mod 4 dividing n. 7
0, 0, 9, 0, 0, 9, 49, 0, 9, 0, 121, 9, 0, 49, 9, 0, 0, 9, 361, 0, 58, 121, 529, 9, 0, 0, 9, 49, 0, 9, 961, 0, 130, 0, 49, 9, 0, 361, 9, 0, 0, 58, 1849, 121, 9, 529, 2209, 9, 49, 0, 9, 0, 0, 9, 121, 49, 370, 0, 3481, 9, 0, 961, 58, 0, 0, 130, 4489, 0, 538, 49, 5041, 9, 0, 0, 9, 361, 170, 9, 6241, 0, 9, 0, 6889, 58 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
Additive with a(p^e) = p^2 if p = 3 (mod 4), 0 otherwise.
a(n) = A005063(n) - A005079(n) - 4*A059841(n). - Antti Karttunen, Jul 11 2017
MATHEMATICA
Array[DivisorSum[#, #^2 &, And[PrimeQ@ #, Mod[#, 4] == 3] &] &, 84] (* Michael De Vlieger, Jul 11 2017 *)
f[p_, e_] := If[Mod[p, 4] == 3, p^2, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
PROG
(Scheme) (define (A005083 n) (if (= 1 n) 0 (+ (if (= 3 (modulo (A020639 n) 4)) (A000290 (A020639 n)) 0) (A005083 (A028234 n))))) ;; Antti Karttunen, Jul 11 2017
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k, 1])%4) == 3, p^2)); \\ Michel Marcus, Jul 11 2017
CROSSREFS
Sequence in context: A073052 A230068 A176908 * A050453 A338017 A341808
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Antti Karttunen, Jul 11 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 11 12:43 EDT 2024. Contains 375069 sequences. (Running on oeis4.)