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!)
A280385 a(n) = Sum_{k=1..n} prime(k)^2*floor(n/prime(k)) . 0
0, 4, 13, 17, 42, 55, 104, 108, 117, 146, 267, 280, 449, 502, 536, 540, 829, 842, 1203, 1232, 1290, 1415, 1944, 1957, 1982, 2155, 2164, 2217, 3058, 3096, 4057, 4061, 4191, 4484, 4558, 4571, 5940, 6305, 6483, 6512, 8193, 8255, 10104, 10229, 10263, 10796, 13005, 13018, 13067, 13096, 13394, 13567, 16376, 16389, 16535 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Sum of all squares of prime divisors of all positive integers <= n.
Partial sums of A005063.
LINKS
FORMULA
G.f.: (1/(1 - x))*Sum_{k>=1} prime(k)^2*x^prime(k)/(1 - x^prime(k)).
EXAMPLE
For n = 6 the prime divisors of the first six positive integers are {0}, {2}, {3}, {2}, {5}, {2, 3} so a(6) = 0^2 + 2^2 + 3^2 + 2^2 + 5^2 + 2^2 + 3^2 = 55.
MATHEMATICA
Table[Sum[Prime[k]^2 Floor[n/Prime[k]], {k, 1, n}], {n, 55}]
Table[Sum[DivisorSum[k, #1^2 &, PrimeQ[#1] &], {k, 1, n}], {n, 55}]
nmax = 55; Rest[CoefficientList[Series[(1/(1 - x)) Sum[Prime[k]^2 x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x]]
PROG
(PARI) a(n) = sum(k=1, n, prime(k)^2 * (n\prime(k))); \\ Indranil Ghosh, Apr 03 2017
(Python)
from sympy import prime
print([sum([prime(k)**2 * (n//prime(k)) for k in range(1, n + 1)]) for n in range(1, 21)]) # Indranil Ghosh, Apr 03 2017
CROSSREFS
Sequence in context: A022132 A041559 A339272 * A190122 A042713 A154130
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Jan 01 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 7 14:59 EDT 2024. Contains 373202 sequences. (Running on oeis4.)