The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A005066 Sum of squares of odd primes dividing n. 6
0, 0, 9, 0, 25, 9, 49, 0, 9, 25, 121, 9, 169, 49, 34, 0, 289, 9, 361, 25, 58, 121, 529, 9, 25, 169, 9, 49, 841, 34, 961, 0, 130, 289, 74, 9, 1369, 361, 178, 25, 1681, 58, 1849, 121, 34, 529, 2209, 9, 49, 25, 298, 169, 2809, 9, 146, 49, 370, 841, 3481, 34, 3721, 961, 58, 0, 194, 130, 4489, 289, 538, 74, 5041, 9, 5329, 1369 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
Additive with a(p^e) = 0 if p = 2, p^2 otherwise.
G.f.: Sum_{k>=2} prime(k)^2*x^prime(k)/(1 - x^prime(k)). - Ilya Gutkovskiy, Jan 04 2017
From Antti Karttunen, Jul 10 & 11 2017: (Start)
a(1) = 0; after which, for even n: a(n) = a(n/2), for odd n: a(n) = A020639(n)^2 + a(A028234(n)).
a(n) = A005063(A000265(n)).
a(n) = A005079(n) + A005083(n).
(End)
MATHEMATICA
Table[Total[Select[Divisors[n], OddQ[#]&&PrimeQ[#]&]^2], {n, 60}] (* Harvey P. Dale, May 02 2012 *)
Array[DivisorSum[#, #^2 &, And[PrimeQ@ #, OddQ@ #] &] &, 74] (* Michael De Vlieger, Jul 11 2017 *)
f[2, e_] := 0; f[p_, e_] := p^2; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 20 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, ((d%2) && isprime(d))*d^2); \\ Michel Marcus, Jan 04 2017
(Scheme) (define (A005066 n) (cond ((= 1 n) 0) ((even? n) (A005066 (/ n 2))) (else (+ (A000290 (A020639 n)) (A005066 (A028234 n)))))) ;; Antti Karttunen, Jul 10 2017
(Python)
from sympy import primefactors
def a(n): return sum(p**2 for p in primefactors(n) if p % 2)
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 11 2017
CROSSREFS
Sequence in context: A067153 A057405 A167354 * A076262 A167301 A177741
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 June 4 16:44 EDT 2024. Contains 373100 sequences. (Running on oeis4.)