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!)
A005063 Sum of squares of primes dividing n. 35

%I #56 Feb 10 2022 20:13:29

%S 0,4,9,4,25,13,49,4,9,29,121,13,169,53,34,4,289,13,361,29,58,125,529,

%T 13,25,173,9,53,841,38,961,4,130,293,74,13,1369,365,178,29,1681,62,

%U 1849,125,34,533,2209,13,49,29,298,173,2809,13,146,53,370,845,3481,38,3721

%N Sum of squares of primes dividing n.

%C The set of these terms apart from 0 is A048261. - _Bernard Schott_, Feb 10 2022

%H Alois P. Heinz, <a href="/A005063/b005063.txt">Table of n, a(n) for n = 1..10000</a>

%F Additive with a(p^e) = p^2.

%F G.f.: Sum_{k>=1} prime(k)^2*x^prime(k)/(1 - x^prime(k)). - _Ilya Gutkovskiy_, Dec 24 2016

%F From _Antti Karttunen_, Jul 11 2017: (Start)

%F a(n) = A005066(n) + 4*A059841(n).

%F a(n) = A005079(n) + A005083(n) + 4*A059841(n).

%F a(n) = A005071(n) + A005075(n) + 9*A079978(n).

%F (End)

%F Dirichlet g.f.: primezeta(s-2)*zeta(s). - _Benedict W. J. Irwin_, Jul 11 2018

%F a(n) = Sum_{p|n, p prime} p^2. - _Wesley Ivan Hurt_, Feb 04 2022

%p A005063 := proc(n)

%p add(d^2, d= numtheory[factorset](n)) ;

%p end proc;

%p seq(A005063(n),n=1..40) ; # _R. J. Mathar_, Nov 08 2011

%t a[n_] := Total[FactorInteger[n][[All, 1]]^2]; a[1]=0; Table[a[n], {n, 1, 60}] (* _Jean-François Alcover_, Mar 20 2017 *)

%t Array[DivisorSum[#, #^2 &, PrimeQ] &, 61] (* _Michael De Vlieger_, Jul 11 2017 *)

%o (PARI) a(n)=local(fm,t);fm=factor(n);t=0;for(k=1,matsize(fm)[1],t+=fm[k,1]^2);t \\ _Franklin T. Adams-Watters_, May 03 2009

%o (PARI) a(n) = vecsum(apply(x->x^2, factor(n)[, 1])); \\ _Michel Marcus_, Sep 19 2020

%o (Scheme) (define (A005063 n) (if (= 1 n) 0 (+ (A000290 (A020639 n)) (A005063 (A028234 n))))) ;; _Antti Karttunen_, Jul 10 2017

%o (Python)

%o from sympy import primefactors

%o def a(n): return sum(p**2 for p in primefactors(n))

%o print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Jul 11 2017

%Y Cf. A000290, A005066, A005071, A005075, A005079, A005083, A059841, A079978.

%Y Cf. A067666, A081403, A048261. - _Franklin T. Adams-Watters_, May 03 2009

%Y Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), A008472 (k=1), this sequence (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), this sequence (k=8), A351197 (k=9), A351198 (k=10).

%K nonn

%O 1,2

%A _N. J. A. Sloane_

%E More terms from _Franklin T. Adams-Watters_, May 03 2009

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 May 15 13:23 EDT 2024. Contains 372540 sequences. (Running on oeis4.)