login
Number of squarefree integers <= 10^n.
18

%I #57 May 11 2024 02:25:05

%S 1,7,61,608,6083,60794,607926,6079291,60792694,607927124,6079270942,

%T 60792710280,607927102274,6079271018294,60792710185947,

%U 607927101854103,6079271018540405,60792710185403794

%N Number of squarefree integers <= 10^n.

%C The limit of a(n)/10^n is 6/Pi^2 (see A059956). - _Gerard P. Michon_, Apr 30 2009

%H J. Pawlewicz, <a href="/A071172/b071172.txt">Table of n, a(n) for n = 0..36</a>

%H W. Hürlimann, <a href="http://dx.doi.org/10.12988/pms.2014.4615">A First Digit Theorem for Square-Free Integer Powers</a>, Pure Mathematical Sciences, Vol. 3, 2014, no. 3, 129 - 139 HIKARI Ltd.

%H G. P. Michon, <a href="http://www.numericana.com/answer/counting.htm#euler193">On the number of squarefree integers not exceeding N</a>. - _Gerard P. Michon_, Apr 30 2009

%H J. Pawlewicz, <a href="http://arxiv.org/abs/1107.4890">Counting square-free numbers</a>, arXiv preprint arXiv:1107.4890 [math.NT], 2011.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Squarefree.html">Squarefree</a>

%F a(n) = Sum_{i=1..10^(n/2)} A008683(i)*floor(10^n/i^2). - _Gerard P. Michon_, Apr 30 2009

%t f[n_] := Sum[ MoebiusMu[i]Floor[n/i^2], {i, Sqrt@ n}]; Table[ f[10^n], {n, 0, 14}] (* _Robert G. Wilson v_, Aug 04 2012 *)

%o (PARI) a(n)=sum(d=1,sqrtint(n=10^n),moebius(d)*n\d^2) \\ _Charles R Greathouse IV_, Nov 14 2012

%o (PARI) a(n)=my(s); forsquarefree(d=1,sqrtint(n=10^n), s += n\d[1]^2 * moebius(d)); s \\ _Charles R Greathouse IV_, Jan 08 2018

%o (Python)

%o from math import isqrt

%o from sympy import mobius

%o def A071172(n): return sum(mobius(k)*(10**n//k**2) for k in range(1,isqrt(10**n)+1)) # _Chai Wah Wu_, May 10 2024

%Y Cf. A005117, A013928.

%Y Apart from initial term, same as A053462.

%Y Binary counterpart is A143658. - _Gerard P. Michon_, Apr 30 2009

%K nonn

%O 0,2

%A _Robert G. Wilson v_, Jun 10 2002

%E Extended by _Eric W. Weisstein_, Sep 14, 2003

%E 3 more terms from _Jud McCranie_, Sep 01 2005

%E 4 more terms from _Gerard P. Michon_, Apr 30 2009