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!)
A013940 a(n) = Sum_{k=1..n} floor(n/prime(k)^2). 6
0, 0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 9, 9, 10, 11, 11, 11, 11, 12, 12, 12, 12, 14, 14, 14, 14, 15, 15, 15, 15, 16, 17, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 23, 23, 24, 24, 24, 25, 26, 26, 26, 26, 27, 27, 27, 27, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,8
COMMENTS
Partial sums of A056170. - Michel Marcus, Aug 24 2013
LINKS
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
Cf. A085548.
Sequence in context: A106733 A087838 A057627 * A029129 A087842 A201206
KEYWORD
nonn
AUTHOR
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 April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)