login
A072490
Number of squarefree numbers (excluding 1) less than n.
2
0, 0, 1, 2, 2, 3, 4, 5, 5, 5, 6, 7, 7, 8, 9, 10, 10, 11, 11, 12, 12, 13, 14, 15, 15, 15, 16, 16, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 25, 26, 27, 28, 28, 28, 29, 30, 30, 30, 30, 31, 31, 32, 32, 33, 33, 34, 35, 36, 36, 37, 38, 38, 38, 39
OFFSET
1,4
FORMULA
a(n) = A013928(n) - 1, n > 1.
G.f.: (x/(1 - x)) * Sum_{k>=2} mu(k)^2*x^k. - Ilya Gutkovskiy, Sep 14 2019
EXAMPLE
a(10) = 5 as the squarefree numbers less than 10 are 2,3,5,6 and 7.
PROG
(PARI) a(n) = sum(k=2, n-1, issquarefree(k)); \\ Michel Marcus, Sep 15 2019
(Python)
from math import isqrt
from sympy import mobius
def A072490(n): return int(sum(mobius(k)*((n-1)//k**2) for k in range(1, isqrt(n-1)+1)))-1 if n>1 else 0 # Chai Wah Wu, Aug 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 14 2002
EXTENSIONS
Name clarified and more terms from Ilya Gutkovskiy, Sep 14 2019
STATUS
approved