OFFSET
1,8
COMMENTS
Partial sums of A056170. - Michel Marcus, Aug 24 2013
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: (1/(1 - x))*Sum_{k>=1} x^(prime(k)^2)/(1 - x^(prime(k)^2)). - Ilya Gutkovskiy, Feb 11 2017
a(n) ~ A085548 * n. - Daniel Suteu, Nov 24 2018
MAPLE
A056170:= n -> nops(select(t -> (t[2]>1), ifactors(n)[2]));
N:= 10000; # to get terms up to a(N)
A:= map(round, Statistics:-CumulativeSum(Array(1..N, A056170)));
seq(A[n], n=1..N); # Robert Israel, Jun 03 2014
MATHEMATICA
Table[Sum[Floor[n/Prime[k]^2], {k, n}], {n, 70}] (* Harvey P. Dale, Mar 30 2018 *)
PROG
(PARI) a(n) = sum(k = 1, n, n\prime(k)^2); \\ Michel Marcus, Aug 24 2013
(PARI) a(n) = my(s=0); forprime(p=2, sqrtint(n), s += n\(p*p)); s; \\ Daniel Suteu, Nov 24 2018
(Magma) [(&+[Floor(n/NthPrime(k)^2): k in [1..n]]): n in [1..70]]; // G. C. Greubel, Nov 25 2018
(Sage) [sum(floor(n/nth_prime(k)^2) for k in (1..n)) for n in (1..70)] # G. C. Greubel, Nov 25 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Henri Lifchitz, Dec 11 1996
STATUS
approved