A066779 Sum of squarefree numbers <= n.
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
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
- Harry J. Smith, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Table[ n*Boole[ SquareFreeQ[n] ], {n, 1, 56}] // Accumulate (* Jean-François Alcover, Jun 18 2013 *)
-
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
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