A053462 Number of positive squarefree integers less than 10^n.
0, 6, 61, 608, 6083, 60794, 607926, 6079291, 60792694, 607927124, 6079270942, 60792710280, 607927102274, 6079271018294, 60792710185947, 607927101854103, 6079271018540405, 60792710185403794, 607927101854022750, 6079271018540280875, 60792710185402613302
Offset: 0
Keywords
Examples
There are 608 squarefree integers smaller than 1000.
Links
- Amiram Eldar, Table of n, a(n) for n = 0..36 (from the b-file at A071172; terms 0..20 from Charles R Greathouse IV)
- Gérard P. Michon, On the number of squarefree integers not exceeding N.
Crossrefs
Programs
-
Mathematica
a[n_] := Module[{t=10^n-1}, Sum[MoebiusMu[k]Floor[t/k^2], {k, 1, Sqrt[t]}]]
-
PARI
a(n)=sum(d=1,sqrtint(n=10^n-1), n\d^2*moebius(d)) \\ Charles R Greathouse IV, Nov 14 2012
-
PARI
a(n)=my(s); forsquarefree(d=1,sqrtint(n=10^n-1), s += n\d[1]^2 * moebius(d)); s \\ Charles R Greathouse IV, Jan 08 2018
-
Python
from math import isqrt from sympy import mobius def A053462(n): m = 10**n-1 return sum(mobius(k)*(m//k**2) for k in range(1, isqrt(m)+1)) # Chai Wah Wu, Jun 01 2024
Formula
a(n)/10^n = (6/Pi^2)*(1+o(1)), cf. A059956.
a(n) = A071172(n) - [n <= 1] where [] is the Iverson bracket. - Chai Wah Wu, Jun 01 2024
Extensions
More terms from Dean Hickerson and Vladeta Jovovic, Aug 06 2001
One more term from Jud McCranie, Sep 01 2005
a(0)=0 and a(14)-a(17) from Gerard P. Michon, Apr 30 2009
a(18)-a(20) from Charles R Greathouse IV, Jan 08 2018