login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A066779
Sum of squarefree numbers <= n.
8
1, 3, 6, 6, 11, 17, 24, 24, 24, 34, 45, 45, 58, 72, 87, 87, 104, 104, 123, 123, 144, 166, 189, 189, 189, 215, 215, 215, 244, 274, 305, 305, 338, 372, 407, 407, 444, 482, 521, 521, 562, 604, 647, 647, 647, 693, 740, 740, 740, 740, 791, 791, 844, 844, 899, 899
OFFSET
1,2
REFERENCES
D. Suryanarayana, The number and sum of k-free integers <= x which are prime to n, Indian J. Math., Vol. 11 (1969), pp. 131-139.
LINKS
FORMULA
a(n) = Sum_{i=1..n} mu(i)^2*i.
a(n) = Sum_{k=1..n} k*A008966(k). - Reinhard Zumkeller, Jul 05 2010
a(n) = Sum_{d=1..sqrt(n)} mu(d)*d^2*floor(n/d^2)*floor(n/d^2+1)/2. - Charles R Greathouse IV, Apr 26 2012
G.f.: Sum_{k>=1} mu(k)^2*k*x^k/(1 - x). - Ilya Gutkovskiy, Apr 16 2017
a(n) ~ (3/Pi^2) * n^2 + O(n^(3/2)) (Suryanarayana, 1969). - Amiram Eldar, Mar 07 2021
MATHEMATICA
Table[ n*Boole[ SquareFreeQ[n] ], {n, 1, 56}] // Accumulate (* Jean-François Alcover, Jun 18 2013 *)
PROG
(PARI) s=0; for (n=1, 1000, write("b066779.txt", n, " ", s+=moebius(n)^2*n) ) \\ Harry J. Smith, Mar 24 2010
(PARI) a(n)=sum(d=1, sqrtint(n), moebius(d)*d^2*binomial(n\d^2+1, 2)) \\ Charles R Greathouse IV, Apr 26 2012
(PARI) a(n)=my(s, k2); forsquarefree(k=1, sqrtint(n), k2=k[1]^2; s+= k2*binomial(n\k2+1, 2)*moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
(Python)
from sympy.ntheory.factor_ import core
def a(n): return sum ([i for i in range(1, n + 1) if core(i) == i]) # Indranil Ghosh, Apr 16 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Jan 18 2002
STATUS
approved